Distributed threaded streaming platform reader

ABSTRACT

A streaming platform reader includes: a reader thread configured to retrieve messages from a plurality of partitions of a streaming platform, wherein each message in the plurality of partitions is associated with a unique identifier; a plurality of queues coupled to the reader thread configured to store messages or an end of partition signal from the reader thread, wherein each queue includes a first position that stores the earliest message stored by a queue; an extraction thread controlled by gate control logic that: compares the identifiers of all of the messages in the first positions of the queues of the plurality of queues, and forwards, to a pool of queues associated with a pool of processing threads, the message content of the message associated with the earliest identifier; and wherein the gate control logic blocks the extraction thread unless each of the queues contains a message or an end of partition signal.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation under 37 C.F.R. § 1.53(b) of U.S.patent application Ser. No. 16/557,248 filed Aug. 30, 2019 now U.S. Pat.No. ______, the entire disclosure of which is incorporated by referencein its entirety and relied upon.

FIELD OF THE INVENTION

The present application relates to distributed computing and morespecifically to software and associated systems and methods forretrieving and storing and/or processing data from a streaming platform.

BACKGROUND

Streaming platforms are useful for their ability to provide data tocontinuous, real-time applications that are configured to react to,process, or transform data. Streaming platforms receive streams ofevents or data changes from a variety of data systems, i.e., producers.The streaming platform feeds the events/data streams to other datasystems, e.g., consumers, such as relational databases, key-valuestores, data clusters, or data warehouses. A streaming platformaccordingly centralizes communication between producers of data andconsumers of that data. One example of a streaming platform is ApacheKafka™.

Kafka stores data in partitions. Partitioning allows a Kafka user tospread data across multiple servers or disks, i.e., for scalabilityand/or redundancy purposes. Streaming platform architectures such asKafka typically guarantee that messages written to a partition by aproducer in a specific order or sequence will be read by a consumer inthat same order or sequence. However, streaming platform architecturessuch as Kafka cannot guarantee that data/messages read across multiplepartitions by a consumer are ordered in the same order or sequence inwhich the messages were transmitted by the producers to the streamingplatform.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a computer network system, according to some embodiments.

FIG. 2 depicts a general computer system, according to some embodiments.

FIG. 3 depicts a storage data structure, according to some embodiments.

FIG. 4A depicts another storage data structure, according to someembodiments.

FIG. 4B depicts yet another storage data structure, according to someembodiments.

FIG. 5 depicts a block diagram of an exchange computing system includinga streaming platform reader, according to some embodiments.

FIG. 6 depicts partitions of an example streaming platform.

FIG. 7 depicts a block diagram of an example streaming platform reader,according to one embodiment.

FIG. 8 illustrates an example queue state machine for implementing gatecontrol logic, according to some embodiments.

FIG. 9 depicts a high-level flowchart illustrating a method ofprocessing messages from a streaming platform, according to someembodiments.

FIG. 10 depicts an alternative block diagram of the streaming platformof FIG. 7 according to one embodiment.

FIG. 11 depicts a block diagram of an example streaming platform reader,according to another embodiment.

FIG. 12 depicts a flow chart showing the operation of the embodiment ofFIG. 11.

DETAILED DESCRIPTION

The disclosed systems and methods enable ordered reading of messagesstreamed from multiple partitions of a streaming platform. The disclosedstreaming platform reader retrieves data messages from the streamingplatform partitions and forwards them to a consuming application, suchas compression processor which compresses and stores the compressed datamessages. In one embodiment, the disclosed streaming platform readeruses an architecture which includes multiple reader threads whichoperate at the highest possible rate of transfer available to thestreaming platform reader, and multiplexes the retrieved data in anordered manner using a writer thread that includes vector gate controllogic. The vector gate control logic implements a queue state machinethat balances a need to read messages as quickly as possible whileordering the messages based on sequencing information associated withthe messages. The gate control logic guarantees that an earlier messagethat is still in a partition is not read after a later message that hasalready been retrieved from a different partition to a queue. Eachreader thread further provides any necessary post processing, e.g.decoding or decrypting the content thereof, of the retrieved messages,before forwarding to a consuming application.

As used herein, a message may be considered “earlier” when it has anolder timestamp relative to another “later” message having a more recenttimestamp. In one embodiment, the timestamps may comprise UNIX epochtime. It will be appreciated that what defines a message as beingearlier or later is implementation dependent and may be measured bytimestamps, sequence numbers or other metric which distinguishes betweena point in time associated with a given message, such as the time ofcreation, time of receipt, arrival time of that message at a definedlocation, etc., relative to another message or relative to a fixed ordynamic origin time period.

In an alternative embodiment, the disclosed streaming platform readeruses an architecture which includes a single reader thread to read fromthe streaming platform and stores the messages into a set of queues, onefor each partition. The stored messages are then retrieved from thesequeues and their content extracted in a multiplexed fashion to retrievethem in an ordered manner using a thread which includes vector gatecontrol logic. The vector gate control logic implements a queue statemachine that balances a need to read messages as quickly as possiblewhile ordering the messages based on sequencing information associatedwith the messages and guarantees that an earlier message that is stillin a partition is not read after a later message that has already beenretrieved from a different partition to a queue. The ordered content ofthe messages is then forwarded to a pool of processing threads whichprocess the message content, e.g. to decrypt or decode it, andsubsequently provide the ordered and processed message content to aconsuming application.

In addition to guaranteeing ordering across multiple partitions, oneembodiment of the streaming platform reader allows for multiple threadsto read messages from the multiple partitions, thus increasing the speedat which ordered data/messages from a streaming platform can be read andused by a computing system. Such an implementation may be more efficientat processing historical data sets, i.e. non-real time messages, whichmay keep all of the reader threads active. The alternative embodimentuses a single thread to read the messages from the multiple partitionsbut uses a pool of multiple threads to further process those messages,thereby more efficiently handling asymmetric partition loads, i.e.where, at any given time, some partitions may have more messages toprocess than others, typical of real time operation. In this case,significant activity on only a few partitions will not result in unusedor low activity reader threads which may impact overall readerperformance, such as due to context switching among all of thosethreads, active or not.

The disclosed embodiments also improve upon the technical field ofstreaming platform processing and reading. At least some of the problemssolved by the disclosed embodiments are specifically rooted intechnology, where streaming platform partitions are a commonarchitectural standard useful for their failover/scalability features,but result in ordering problems across multiple partitions, and aresolved by the disclosed streaming platform reader that implements thevector gate control logic to impose an additional wait time on alreadyretrieved/available/downloaded messages to ensure ordering acrossmultiple partitions. In one embodiment, dedicated reading and processingthreads for each partition are avoided so as to efficiently processasymmetric processing loads across the partitions and unnecessarycontext switching.

In one application of the streaming platform reader, an auditing systemcompares the streaming platform data with data recorded directly fromthe data producers. In such an application, having ordered data (fromthe streaming platform reader) reduces the queuing memory required forthe audit system, as well as increases the speed with which the data canbe audited/compared to a data set that already contains ordered data.

The disclosed embodiments may be implemented in a data transactionprocessing system that processes data items or objects, such as anexchange computing system. Customer or user devices (e.g., clientcomputers) may submit electronic data transaction request messages,e.g., inbound messages, to the data transaction processing system over adata communication network. The electronic data transaction requestmessages may include, for example, transaction matching parameters, suchas instructions and/or values, for processing the data transactionrequest messages within the data transaction processing system. Theinstructions may be to perform transactions, e.g., buy or sell aquantity of a product at a range of values defined equations. Products,e.g., financial instruments, or order books representing the state of anelectronic marketplace for a product, may be represented as data objectswithin the exchange computing system. The instructions may also beconditional, e.g., buy or sell a quantity of a product at a given valueif a trade for the product is executed at some other reference value.

The data transaction processing system may include various matchingprocessors that match, e.g., automatically, electronic data transactionrequest messages for the same one of the data items or objects. Thematching processors may match, or attempt to match, electronic datatransaction request messages based on multiple transaction matchingparameters from the different client computers. Input electronic datatransaction request messages may be received from different clientcomputers over a data communication network, and output electronic datatransaction result messages may be transmitted to the client computersand may be indicative of results of the attempts to match incomingelectronic data transaction request messages. The matching processorsmay additionally generate information indicative of a state of anenvironment (e.g., the state of the order book) based on the processing,and report this information to data recipient computing systems viaoutbound messages published via one or more data feeds. While thedisclosed embodiments may be described with respect to electronic datatransaction request and result messages, it will be appreciated that thedisclosed embodiments may be implemented with respect to othertechnologies later developed, such as photonic, e.g., light-based,messages.

Exchange Computing System

The output electronic data transaction result messages may be streamedto a streaming platform. For example, one exemplary environment where astreaming platform architecture is used is in financial markets, and inparticular, electronic financial exchanges, such as a futures exchange,such as the Chicago Mercantile Exchange Inc. (CME). In one embodiment,the content of the electronic data transaction result messages may beencrypted or otherwise encoded, necessitating decoding or decrypting themessage content by the streaming platform reader prior to forwarding tothe consuming application as will be described. While the disclosedembodiments will be described with respect to an implementation wherethe message content is decoded/decrypted, it will be appreciated thatthe disclosed embodiments may also be deployed in environments where themessage content requires other forms of post processing, such asderivation, conversion, translation or transformation, or no postprocessing, e.g. the content is neither encoded nor encrypted and,therefore, post processing, e.g. decoding/decryption, is unnecessary. Insuch implementations, the post processing of encoded/encrypted messagingmay be excluded.

A financial instrument trading system, such as a futures exchange, suchas the Chicago Mercantile Exchange Inc. (CME), provides a contractmarket where financial instruments, e.g., futures and options onfutures, are traded using electronic systems. “Futures” is a term usedto designate all contracts for the purchase or sale of financialinstruments or physical commodities for future delivery or cashsettlement on a commodity futures exchange. A futures contract is alegally binding agreement to buy or sell a commodity at a specifiedprice at a predetermined future time. An option contract is the right,but not the obligation, to sell or buy the underlying instrument (inthis case, a futures contract) at a specified price on or before acertain expiration date. An option contract offers an opportunity totake advantage of futures price moves without actually having a futuresposition. The commodity to be delivered in fulfillment of the contract,or alternatively the commodity for which the cash market price shalldetermine the final settlement price of the futures contract, is knownas the contract's underlying reference or “underlier.” The underlying orunderlier for an options contract is the corresponding futures contractthat is purchased or sold upon the exercise of the option.

The terms and conditions of each futures contract are standardized as tothe specification of the contract's underlying reference commodity, thequality of such commodity, quantity, delivery date, and means ofcontract settlement. Cash settlement is a method of settling a futurescontract whereby the parties effect final settlement when the contractexpires by paying/receiving the loss/gain related to the contract incash, rather than by effecting physical sale and purchase of theunderlying reference commodity at a price determined by the futurescontract, price. Options and futures may be based on more generalizedmarket indicators, such as stock indices, interest rates, futurescontracts and other derivatives.

Electronic Trading

Electronic trading of financial instruments, such as futures contracts,is conducted by market participants sending orders, such as to buy orsell one or more futures contracts, in electronic form to the exchange.These electronically submitted orders to buy and sell are then matched,if possible, by the exchange, i.e., by the exchange's matching engine,to execute a trade. Outstanding (unmatched, wholly unsatisfied/unfilledor partially satisfied/filled) orders are maintained in one or more datastructures or databases referred to as “order books,” such orders beingreferred to as “resting,” and made visible, i.e., their availability fortrading is advertised, to the market participants through electronicnotifications/broadcasts, referred to as market data feeds. An orderbook is typically maintained for each product, e.g., instrument, tradedon the electronic trading system and generally defines or otherwiserepresents the state of the market for that product, i.e., the currentprices at which the market participants are willing buy or sell thatproduct. As such, as used herein, an order book for a product may alsobe referred to as a market for that product.

Upon receipt of an incoming order to trade in a particular financialinstrument, whether for a single-component financial instrument, e.g., asingle futures contract, or for a multiple-component financialinstrument, e.g., a combination contract such as a spread contract, amatch engine, as described herein, will attempt to identify a previouslyreceived but unsatisfied order counter thereto, i.e., for the oppositetransaction (buy or sell) in the same financial instrument at the sameor better price (but not necessarily for the same quantity unless, forexample, either order specifies a condition that it must be entirelyfilled or not at all).

Previously received but unsatisfied orders, i.e., orders which eitherdid not match with a counter order when they were received or theirquantity was only partially satisfied, referred to as a partial fill,are maintained by the electronic trading system in an order bookdatabase/data structure to await the subsequent arrival of matchingorders or the occurrence of other conditions which may cause the orderto be modified or otherwise removed from the order book.

If the match engine identifies one or more suitable previously receivedbut unsatisfied counter orders, they, and the incoming order, arematched to execute a trade there between to at least partially satisfythe quantities of one or both the incoming order or the identifiedorders. If there remains any residual unsatisfied quantity of theidentified one or more orders, those orders are left on the order bookwith their remaining quantity to await a subsequent suitable counterorder, i.e., to rest. If the match engine does not identify a suitablepreviously received but unsatisfied counter order, or the one or moreidentified suitable previously received but unsatisfied counter ordersare for a lesser quantity than the incoming order, the incoming order isplaced on the order book, referred to as “resting”, with original orremaining unsatisfied quantity, to await a subsequently receivedsuitable order counter thereto. The match engine then generates matchevent data reflecting the result of this matching process. Othercomponents of the electronic trading system, as will be described, thengenerate the respective order acknowledgment and market data messagesand transmit those messages to the market participants.

Matching, which is a function typically performed by the exchange, is aprocess, for a given order which specifies a desire to buy or sell aquantity of a particular instrument at a particular price, ofseeking/identifying one or more wholly or partially, with respect toquantity, satisfying counter orders thereto, e.g., a sell counter to anorder to buy, or vice versa, for the same instrument at the same, orsometimes better, price (but not necessarily the same quantity), whichare then paired for execution to complete a trade between the respectivemarket participants (via the exchange) and at least partially satisfythe desired quantity of one or both of the order and/or the counterorder, with any residual unsatisfied quantity left to await anothersuitable counter order, referred to as “resting.” A match event mayoccur, for example, when an aggressing order matches with a restingorder. In one embodiment, two orders match because one order includesinstructions for or specifies buying a quantity of a particularinstrument at a particular price, and the other order includesinstructions for or specifies selling a (different or same) quantity ofthe instrument at a same or better price. It should be appreciated thatperforming an instruction associated with a message may includeattempting to perform the instruction. Whether or not an exchangecomputing system is able to successfully perform an instruction maydepend on the state of the electronic marketplace.

While the disclosed embodiments will be described with respect to aproduct by product or market by market implementation, e.g. implementedfor each market/order book, it will be appreciated that the disclosedembodiments may be implemented so as to apply across markets formultiple products traded on one or more electronic trading systems, suchas by monitoring an aggregate, correlated or other derivation of therelevant indicative parameters as described herein.

While the disclosed embodiments may be discussed in relation to futuresand/or options on futures trading, it should be appreciated that thedisclosed embodiments may be applicable to any equity, fixed incomesecurity, currency, commodity, options or futures trading system ormarket now available or later developed. It may be appreciated that atrading environment, such as a futures exchange as described herein,implements one or more economic markets where rights and obligations maybe traded. As such, a trading environment may be characterized by a needto maintain market integrity, transparency, predictability,fair/equitable access and participant expectations with respect thereto.In addition, it may be appreciated that electronic trading systemsfurther impose additional expectations and demands by marketparticipants as to transaction processing speed, latency, capacity andresponse time, while creating additional complexities relating thereto.Accordingly, as will be described, the disclosed embodiments may furtherinclude functionality to ensure that the expectations of marketparticipants are met, e.g., that transactional integrity and predictablesystem responses are maintained.

Financial instrument trading systems allow traders to submit orders andreceive confirmations, market data, and other information electronicallyvia electronic messages exchanged using a network. Electronic tradingsystems ideally attempt to offer a more efficient, fair and balancedmarket where market prices reflect a true consensus of the value oftraded products among the market participants, where the intentional orunintentional influence of any one market participant is minimized ifnot eliminated, and where unfair or inequitable advantages with respectto information access are minimized if not eliminated.

Electronic marketplaces attempt to achieve these goals by usingelectronic messages to communicate actions and related data of theelectronic marketplace between market participants, clearing firms,clearing houses, and other parties. The messages can be received usingan electronic trading system, wherein an action or transactionassociated with the messages may be executed. For example, the messagemay contain information relating to an order to buy or sell a product ina particular electronic marketplace, and the action associated with themessage may indicate that the order is to be placed in the electronicmarketplace such that other orders which were previously placed maypotentially be matched to the order of the received message. Thus theelectronic marketplace may conduct market activities through electronicsystems.

An exchange may provide for a centralized “clearing house” through whichtrades made must be confirmed, matched, and settled each day untiloffset or delivered. The clearing house may be an adjunct to anexchange, and may be an operating division of an exchange, which isresponsible for settling trading accounts, clearing trades, collectingand maintaining performance bond funds, regulating delivery, andreporting trading data. One of the roles of the clearing house is tomitigate credit risk. Clearing is the procedure through which theclearing house becomes buyer to each seller of a futures contract, andseller to each buyer, also referred to as a novation, and assumesresponsibility for protecting buyers and sellers from financial loss dueto breach of contract, by assuring performance on each contract. Aclearing member is a firm qualified to clear trades through the clearinghouse.

An exchange computing system may operate under a central counterpartymodel, where the exchange acts as an intermediary between marketparticipants for the transaction of financial instruments. Inparticular, the exchange computing system novates itself into thetransactions between the market participants, i.e., splits a giventransaction between the parties into two separate transactions where theexchange computing system substitutes itself as the counterparty to eachof the parties for that part of the transaction, sometimes referred toas a novation. In this way, the exchange computing system acts as aguarantor and central counterparty and there is no need for the marketparticipants to disclose their identities to each other, or subjectthemselves to credit or other investigations by a potentialcounterparty. For example, the exchange computing system insulates onemarket participant from the default by another market participant.Market participants need only meet the requirements of the exchangecomputing system. Anonymity among the market participants encourages amore liquid market environment as there are lower barriers toparticipation. The exchange computing system can accordingly offerbenefits such as centralized and anonymous matching and clearing.

Electronic Data Transaction Request Messages

As used herein, a financial message, or an electronic message, refersboth to messages communicated by market participants to an electronictrading or market system and vice versa. The messages may becommunicated using packeting or other techniques operable to communicateinformation between systems and system components. Some messages may beassociated with actions to be taken in the electronic trading or marketsystem. In particular, in one embodiment, upon receipt of a request, atoken is allocated and included in a TCP shallow acknowledgmenttransmission sent back to the participant acknowledging receipt of therequest. It should be appreciated that while this shallow acknowledgmentis, in some sense, a response to the request, it does not confirm theprocessing of an order included in the request. The participant, i.e.,their device, then sends back a TCP acknowledgment which acknowledgesreceipt of the shallow acknowledgment and token.

Financial messages communicated to the electronic trading system, alsoreferred to as “inbound” messages, may include associated actions thatcharacterize the messages, such as trader orders, order modifications,order cancellations and the like, as well as other message types.Inbound messages may be sent from client devices associated with marketparticipants, or their representatives, e.g., trade order messages,etc., to an electronic trading or market system. For example, a marketparticipant may submit an electronic message to the electronic tradingsystem that includes an associated specific action to be undertaken bythe electronic trading system, such as entering a new trade order intothe market or modifying an existing order in the market. In oneembodiment, if a participant wishes to modify a previously sent request,e.g., a prior order which has not yet been processed or traded, they maysend a request message comprising a request to modify the prior request.In one exemplary embodiment, the incoming request itself, e.g., theinbound order entry, may be referred to as an iLink message. iLink is abidirectional communications/message protocol/message format implementedby the Chicago Mercantile Exchange Inc.

Financial messages communicated from the electronic trading system,referred to as “outbound” messages, may include messages responsive toinbound messages, such as confirmation messages, or other messages suchas market update messages, quote messages, and the like. Outboundmessages may be disseminated via data feeds.

Financial messages may further be categorized as having or reflecting animpact on a market or electronic marketplace, also referred to as an“order book” or “book,” for a traded product, such as a prevailing pricetherefore, number of resting orders at various price levels andquantities thereof, etc., or not having or reflecting an impact on amarket or a subset or portion thereof. In one embodiment, an electronicorder book may be understood to be an electronic collection of theoutstanding or resting orders for a financial instrument.

For example, a request to place a trade may result in a responseindicative of the trade either being matched with, or being rested on anorder book to await, a suitable counter-order. This response may includea message directed solely to the trader who submitted the order toacknowledge receipt of the order and report whether it was matched, andthe extent thereto, or rested. The response may further include amessage to all market participants reporting a change in the order bookdue to the order. This response may take the form of a report of thespecific change to the order book, e.g., an order for quantity X atprice Y was added to the book (referred to, in one embodiment, as aMarket By Order message), or may simply report the result, e.g., pricelevel Y now has orders for a total quantity of Z (where Z is the sum ofthe previous resting quantity plus quantity X of the new order). In somecases, requests may elicit a non-impacting response, such as temporallyproximate to the receipt of the request, and then cause a separatemarket-impact reflecting response at a later time. For example, a stoporder, fill or kill order (FOK), also known as an immediate or cancelorder, or other conditional request may not have an immediate marketimpacting effect, if at all, until the requisite conditions are met.

An acknowledgement or confirmation of receipt, e.g., a non-marketimpacting communication, may be sent to the trader simply confirmingthat the order was received. Upon the conditions being met and a marketimpacting result thereof occurring, a market-impacting message may betransmitted as described herein both directly back to the submittingmarket participant and to all market participants (in a Market By Price“MBP” e.g., Aggregated By Value (“ABV”) book, or Market By Order “MBO”,e.g., Per Order (“PO”) book format). It should be appreciated thatadditional conditions may be specified, such as a time or price limit,which may cause the order to be dropped or otherwise canceled and thatsuch an event may result in another non-market-impacting communicationinstead. In some implementations, market impacting communications may becommunicated separately from non-market impacting communications, suchas via a separate communications channel or feed.

For additional details and descriptions of different market data feeds,see U.S. Patent Publication No. 2017/0331774, filed on May 16, 2016,entitled “Systems and Methods for Consolidating Multiple Feed Data”,assigned to the assignee of the present application, the entirety ofwhich is incorporated by reference herein and relied upon.

Clearing House

The clearing house of an exchange clears, settles and guarantees matchedtransactions in contracts occurring through the facilities of theexchange. In addition, the clearing house establishes and monitorsfinancial requirements for clearing members and conveys certain clearingprivileges in conjunction with the relevant exchange markets.

The clearing house establishes clearing level performance bonds(margins) for all products of the exchange and establishes minimumperformance bond requirements for customers of such products. Aperformance bond, also referred to as a margin requirement, correspondswith the funds that must be deposited by a customer with his or herbroker, by a broker with a clearing member or by a clearing member withthe clearing house, for the purpose of insuring the broker or clearinghouse against loss on open futures or options contracts. This is not apart payment on a purchase. The performance bond helps to ensure thefinancial integrity of brokers, clearing members and the exchange as awhole. The performance bond refers to the minimum dollar depositrequired by the clearing house from clearing members in accordance withtheir positions. Maintenance, or maintenance margin, refers to a sum,usually smaller than the initial performance bond, which must remain ondeposit in the customer's account for any position at all times. Theinitial margin is the total amount of margin per contract required bythe broker when a futures position is opened. A drop in funds below thislevel requires a deposit back to the initial margin levels, i.e., aperformance bond call. If a customer's equity in any futures positiondrops to or under the maintenance level because of adverse price action,the broker must issue a performance bond/margin call to restore thecustomer's equity. A performance bond call, also referred to as a margincall, is a demand for additional funds to bring the customer's accountback up to the initial performance bond level whenever adverse pricemovements cause the account to go below the maintenance.

The exchange derives its financial stability in large part by removingdebt obligations among market participants as they occur. This isaccomplished by determining a settlement price at the close of themarket each day for each contract and marking all open positions to thatprice, referred to as “mark to market.” Every contract is debited orcredited based on that trading session's gains or losses. As prices movefor or against a position, funds flow into and out of the tradingaccount. In the case of the CME, each business day by 6:40 a.m. Chicagotime, based on the mark-to-the-market of all open positions to theprevious trading day's settlement price, the clearing house pays to orcollects cash from each clearing member. This cash flow, known assettlement variation, is performed by CME's settlement banks based oninstructions issued by the clearing house. All payments to andcollections from clearing members are made in “same-day” funds. Inaddition to the 6:40 a.m. settlement, a daily intra-day mark-to-themarket of all open positions, including trades executed during theovernight GLOBEX®, the CME's electronic trading systems, trading sessionand the current day's trades matched before 11:15 a.m., is performedusing current prices. The resulting cash payments are made intra-day forsame day value. In times of extreme price volatility, the clearing househas the authority to perform additional intra-day mark-to-the-marketcalculations on open positions and to call for immediate payment ofsettlement variation. CME's mark-to-the-market settlement system differsfrom the settlement systems implemented by many other financial markets,including the interbank, Treasury securities, over-the-counter foreignexchange and debt, options, and equities markets, where participantsregularly assume credit exposure to each other. In those markets, thefailure of one participant can have a ripple effect on the solvency ofthe other participants. Conversely, CME's mark-to-the-market system doesnot allow losses to accumulate over time or allow a market participantthe opportunity to defer losses associated with market positions.

While the disclosed embodiments may be described in reference to theCME, it should be appreciated that these embodiments are applicable toany exchange. Such other exchanges may include a clearing house that,like the CME clearing house, clears, settles and guarantees all matchedtransactions in contracts of the exchange occurring through itsfacilities. In addition, such clearing houses establish and monitorfinancial requirements for clearing members and convey certain clearingprivileges in conjunction with the relevant exchange markets.

The disclosed embodiments are also not limited to uses by a clearinghouse or exchange for purposes of enforcing a performance bond or marginrequirement. For example, a market participant may use the disclosedembodiments in a simulation or other analysis of a portfolio. In suchcases, the settlement price may be useful as an indication of a value atrisk and/or cash flow obligation rather than a performance bond. Thedisclosed embodiments may also be used by market participants or otherentities to forecast or predict the effects of a prospective position onthe margin requirement of the market participant.

Trading Environment

The embodiments may be described in terms of a distributed computingsystem. The particular examples identify a specific set of componentsuseful in a futures and options exchange. However, many of thecomponents and inventive features are readily adapted to otherelectronic trading environments. The specific examples described hereinmay teach specific protocols and/or interfaces, although it should beunderstood that the principals involved may be extended to, or appliedin, other protocols and interfaces.

It should be appreciated that the plurality of entities utilizing orinvolved with the disclosed embodiments, e.g., the market participants,may be referred to by other nomenclature reflecting the role that theparticular entity is performing with respect to the disclosedembodiments and that a given entity may perform more than one roledepending upon the implementation and the nature of the particulartransaction being undertaken, as well as the entity's contractual and/orlegal relationship with another market participant and/or the exchange.

An exemplary trading network environment for implementing tradingsystems and methods is shown in FIG. 1. An exchange computer system 100receives messages that include orders and transmits market data relatedto orders and trades to users, such as via wide area network 162 and/orlocal area network 160 and computer devices 150, 152, 154, 156 and 158,as described herein, coupled with the exchange computer system 100.

Herein, the phrase “coupled with” is defined to mean directly connectedto or indirectly connected through one or more intermediate components.Such intermediate components may include both hardware and softwarebased components. Further, to clarify the use in the pending claims andto hereby provide notice to the public, the phrases “at least one of<A>, <B>, . . . and <N>” or “at least one of <A>, <B>, . . . <N>, orcombinations thereof” are defined by the Applicant in the broadestsense, superseding any other implied definitions herebefore orhereinafter unless expressly asserted by the Applicant to the contrary,to mean one or more elements selected from the group comprising A, B, .. . and N, that is to say, any combination of one or more of theelements A, B, . . . or N including any one element alone or incombination with one or more of the other elements which may alsoinclude, in combination, additional elements not listed.

The exchange computer system 100 may be implemented with one or moremainframe, desktop or other computers, such as the example computer 200described herein with respect to FIG. 2.

A user database 102 may be provided which includes informationidentifying traders and other users of exchange computer system 100,such as account numbers or identifiers, usernames and passwords. Anaccount data module 104 may be provided which may process accountinformation that may be used during trades.

A match engine module 106 may be included to match bid and offer pricesand may be implemented with software that executes one or morealgorithms for matching bids and offers. A trade database 108 may beincluded to store information identifying trades and descriptions oftrades. In particular, a trade database may store informationidentifying the time that a trade took place and the contract price. Anorder book module 110 may be included to compute or otherwise determinecurrent bid and offer prices, e.g., in a continuous auction market, oralso operate as an order accumulation buffer for a batch auction market.

A market data module 112 may be included to collect market data andprepare the data for transmission to users.

A risk management module 114 may be included to compute and determine auser's risk utilization in relation to the user's defined riskthresholds. The risk management module 114 may also be configured todetermine risk assessments or exposure levels in connection withpositions held by a market participant. The risk management module 114may be configured to administer, manage or maintain one or moremargining mechanisms implemented by the exchange computer system 100.Such administration, management or maintenance may include managing anumber of database records reflective of margin accounts of the marketparticipants. In some embodiments, the risk management module 114implements one or more aspects of the disclosed embodiments, including,for instance, principal component analysis (PCA) based margining, inconnection with interest rate swap (IRS) portfolios, as describedherein.

A message management module 116 may be included to, among other things,receive, and extract orders from, electronic data transaction requestmessages. The message management module 116 may define a point ofingress into the exchange computer system 100 where messages are orderedand considered to be received by the system. This may be considered apoint of determinism in the exchange computer system 100 that definesthe earliest point where the system can ascribe an order of receipt toarriving messages. The point of determinism may or may not be at or nearthe demarcation point between the exchange computer system 100 and apublic/internet network infrastructure. The message management module116 processes messages by interpreting the contents of a message basedon the message transmit protocol, such as the transmission controlprotocol (“TCP”), to provide the content of the message for furtherprocessing by the exchange computer system.

The message management module 116 may also be configured to detectcharacteristics of an order for a transaction to be undertaken in anelectronic marketplace. For example, the message management module 116may identify and extract order content such as a price, product, volume,and associated market participant for an order. The message managementmodule 116 may also identify and extract data indicating an action to beexecuted by the exchange computer system 100 with respect to theextracted order. For example, the message management module 116 maydetermine the transaction type of the transaction requested in a givenmessage. A message may include an instruction to perform a type oftransaction. The transaction type may be, in one embodiment, arequest/offer/order to either buy or sell a specified quantity or unitsof a financial instrument at a specified price or value. The messagemanagement module 116 may also identify and extract other orderinformation and other actions associated with the extracted order. Allextracted order characteristics, other information, and associatedactions extracted from a message for an order may be collectivelyconsidered an order as described and referenced herein.

Order or message characteristics may include, for example, the state ofthe system after a message is received, arrival time (e.g., the time amessage arrives at the MSG or Market Segment Gateway), message type(e.g., new, modify, cancel), and the number of matches generated by amessage. Order or message characteristics may also include marketparticipant side (e.g., buyer or seller) or time in force (e.g., a gooduntil end of day order that is good for the full trading day, a gooduntil canceled ordered that rests on the order book until matched, or afill or kill order that is canceled if not filled immediately, or a filland kill order (FOK) that is filled to the maximum amount possible, andany remaining or unfilled/unsatisfied quantity is not stored on thebooks or allowed to rest).

An order processing module 118 may be included to decompose delta-based,spread instrument, bulk and other types of composite orders forprocessing by the order book module 110 and/or the match engine module106. The order processing module 118 may also be used to implement oneor more procedures related to clearing an order. The order may becommunicated from the message management module 118 to the orderprocessing module 118. The order processing module 118 may be configuredto interpret the communicated order, and manage the ordercharacteristics, other information, and associated actions as they areprocessed through an order book module 110 and eventually transacted onan electronic market. For example, the order processing module 118 maystore the order characteristics and other content and execute theassociated actions. In an embodiment, the order processing module mayexecute an associated action of placing the order into an order book foran electronic trading system managed by the order book module 110. In anembodiment, placing an order into an order book and/or into anelectronic trading system may be considered a primary action for anorder. The order processing module 118 may be configured in variousarrangements, and may be configured as part of the order book module110, part of the message management module 118, or as an independentfunctioning module.

As an intermediary to electronic trading transactions, the exchangebears a certain amount of risk in each transaction that takes place. Tothat end, the clearing house implements risk management mechanisms toprotect the exchange. One or more of the modules of the exchangecomputer system 100 may be configured to determine settlement prices forconstituent contracts, such as deferred month contracts, of spreadinstruments, such as for example, settlement module 120. A settlementmodule 120 (or settlement processor or other payment processor) may beincluded to provide one or more functions related to settling orotherwise administering transactions cleared by the exchange. Settlementmodule 120 of the exchange computer system 100 may implement one or moresettlement price determination techniques. Settlement-related functionsneed not be limited to actions or events occurring at the end of acontract term. For instance, in some embodiments, settlement-relatedfunctions may include or involve daily or other mark to marketsettlements for margining purposes. In some cases, the settlement module120 may be configured to communicate with the trade database 108 (or thememory(ies) on which the trade database 108 is stored) and/or todetermine a payment amount based on a spot price, the price of thefutures contract or other financial instrument, or other price data, atvarious times. The determination may be made at one or more points intime during the term of the financial instrument in connection with amargining mechanism. For example, the settlement module 120 may be usedto determine a mark to market amount on a daily basis during the term ofthe financial instrument. Such determinations may also be made on asettlement date for the financial instrument for the purposes of finalsettlement.

In some embodiments, the settlement module 120 may be integrated to anydesired extent with one or more of the other modules or processors ofthe exchange computer system 100. For example, the settlement module 120and the risk management module 114 may be integrated to any desiredextent. In some cases, one or more margining procedures or other aspectsof the margining mechanism(s) may be implemented by the settlementmodule 120.

One or more of the above-described modules of the exchange computersystem 100 may be used to gather or obtain data to support thesettlement price determination, as well as a subsequent marginrequirement determination. For example, the order book module 110 and/orthe market data module 112 may be used to receive, access, or otherwiseobtain market data, such as bid-offer values of orders currently on theorder books. The trade database 108 may be used to receive, access, orotherwise obtain trade data indicative of the prices and volumes oftrades that were recently executed in a number of markets. In somecases, transaction data (and/or bid/ask data) may be gathered orobtained from open outcry pits and/or other sources and incorporatedinto the trade and market data from the electronic trading system(s).

It should be appreciated that concurrent processing limits may bedefined by or imposed separately or in combination on one or more of thetrading system components, including the user database 102, the accountdata module 104, the match engine module 106, the trade database 108,the order book module 110, the market data module 112, the riskmanagement module 114, the message management module 116, the orderprocessing module 118, the settlement module 120, or other component ofthe exchange computer system 100.

The disclosed mechanisms may be implemented at any logical and/orphysical point(s), or combinations thereof, at which the relevantinformation/data (e.g., message traffic and responses thereto) may bemonitored or flows or is otherwise accessible or measurable, includingone or more gateway devices, modems, the computers or terminals of oneor more market participants, e.g., client computers, etc.

One skilled in the art will appreciate that one or more modulesdescribed herein may be implemented using, among other things, atangible computer-readable medium comprising computer-executableinstructions (e.g., executable software code). Alternatively, modulesmay be implemented as software code, firmware code, specificallyconfigured hardware or processors, and/or a combination of theaforementioned. For example, the modules may be embodied as part of anexchange 100 for financial instruments. It should be appreciated thedisclosed embodiments may be implemented as a different or separatemodule of the exchange computer system 100, or a separate computersystem coupled with the exchange computer system 100 so as to haveaccess to margin account record, pricing, and/or other data. Asdescribed herein, the disclosed embodiments may be implemented as acentrally accessible system or as a distributed system, e.g., where someof the disclosed functions are performed by the computer systems of themarket participants.

The trading network environment shown in FIG. 1 includes exemplarycomputer devices 150, 152, 154, 156 and 158 which depict differentexemplary methods or media by which a computer device may be coupledwith the exchange computer system 100 or by which a user maycommunicate, e.g., send and receive, trade or other informationtherewith. It should be appreciated that the types of computer devicesdeployed by traders and the methods and media by which they communicatewith the exchange computer system 100 is implementation dependent andmay vary and that not all of the depicted computer devices and/ormeans/media of communication may be used and that other computer devicesand/or means/media of communications, now available or later developedmay be used. Each computer device, which may comprise a computer 200described in more detail with respect to FIG. 2, may include a centralprocessor, specifically configured or otherwise, that controls theoverall operation of the computer and a system bus that connects thecentral processor to one or more conventional components, such as anetwork card or modem. Each computer device may also include a varietyof interface units and drives for reading and writing data or files andcommunicating with other computer devices and with the exchange computersystem 100. Depending on the type of computer device, a user caninteract with the computer with a keyboard, pointing device, microphone,pen device or other input device now available or later developed.

An exemplary computer device 150 is shown directly connected to exchangecomputer system 100, such as via a T1 line, a common local area network(LAN) or other wired and/or wireless medium for connecting computerdevices, such as the network 220 shown in FIG. 2 and described withrespect thereto. The exemplary computer device 150 is further shownconnected to a radio 168. The user of radio 168, which may include acellular telephone, smart phone, or other wireless proprietary and/ornon-proprietary device, may be a trader or exchange employee. The radiouser may transmit orders or other information to the exemplary computerdevice 150 or a user thereof. The user of the exemplary computer device150, or the exemplary computer device 150 alone and/or autonomously, maythen transmit the trade or other information to the exchange computersystem 100.

Exemplary computer devices 152 and 154 are coupled with a local areanetwork (“LAN”) 160 which may be configured in one or more of thewell-known LAN topologies, e.g., star, daisy chain, etc., and may use avariety of different protocols, such as Ethernet, TCP/IP, etc. Theexemplary computer devices 152 and 154 may communicate with each otherand with other computer and other devices which are coupled with the LAN160. Computer and other devices may be coupled with the LAN 160 viatwisted pair wires, coaxial cable, fiber optics or other wired orwireless media. As shown in FIG. 1, an exemplary wireless personaldigital assistant device (“PDA”) 158, such as a mobile telephone, tabletbased compute device, or other wireless device, may communicate with theLAN 160 and/or the Internet 162 via radio waves, such as via WiFi,Bluetooth and/or a cellular telephone based data communicationsprotocol. PDA 158 may also communicate with exchange computer system 100via a conventional wireless hub 164.

FIG. 1 also shows the LAN 160 coupled with a wide area network (“WAN”)162 which may be comprised of one or more public or private wired orwireless networks. In one embodiment, the WAN 162 includes the Internet162. The LAN 160 may include a router to connect LAN 160 to the Internet162. Exemplary computer device 156 is shown coupled directly to theInternet 162, such as via a modem, DSL line, satellite dish or any otherdevice for connecting a computer device to the Internet 162 via aservice provider therefore as is known. LAN 160 and/or WAN 162 may bethe same as the network 220 shown in FIG. 2 and described with respectthereto.

Users of the exchange computer system 100 may include one or more marketmakers 166 which may maintain a market by providing constant bid andoffer prices for a derivative or security to the exchange computersystem 100, such as via one of the exemplary computer devices depicted.The exchange computer system 100 may also exchange information withother match or trade engines, such as trade engine 170. One skilled inthe art will appreciate that numerous additional computers and systemsmay be coupled to exchange computer system 100. Such computers andsystems may include clearing, regulatory and fee systems.

The operations of computer devices and systems shown in FIG. 1 may becontrolled by computer-executable instructions stored on anon-transitory computer-readable medium. For example, the exemplarycomputer device 152 may store computer-executable instructions forreceiving order information from a user, transmitting that orderinformation to exchange computer system 100 in electronic messages,extracting the order information from the electronic messages, executingactions relating to the messages, and/or calculating values fromcharacteristics of the extracted order to facilitate matching orders andexecuting trades. In another example, the exemplary computer device 154may include computer-executable instructions for receiving market datafrom exchange computer system 100 and displaying that information to auser.

Numerous additional servers, computers, handheld devices, personaldigital assistants, telephones and other devices may also be connectedto exchange computer system 100. Moreover, one skilled in the art willappreciate that the topology shown in FIG. 1 is merely an example andthat the components shown in FIG. 1 may include other components notshown and be connected by numerous alternative topologies.

Referring now to FIG. 2, an illustrative embodiment of a generalcomputer system 200 is shown. The computer system 200 can include a setof instructions that can be executed to cause the computer system 200 toperform any one or more of the methods or computer based functionsdisclosed herein. The computer system 200 may operate as a standalonedevice or may be connected, e.g., using a network, to other computersystems or peripheral devices. Any of the components discussed herein,such as processor 202, may be a computer system 200 or a component inthe computer system 200. The computer system 200 may be specificallyconfigured to implement a match engine, margin processing, payment orclearing function on behalf of an exchange, such as the ChicagoMercantile Exchange, of which the disclosed embodiments are a componentthereof.

In a networked deployment, the computer system 200 may operate in thecapacity of a server or as a client user computer in a client-serveruser network environment, or as a peer computer system in a peer-to-peer(or distributed) network environment. The computer system 200 can alsobe implemented as or incorporated into various devices, such as apersonal computer (PC), a tablet PC, a set-top box (STB), a personaldigital assistant (PDA), a mobile device, a palmtop computer, a laptopcomputer, a desktop computer, a communications device, a wirelesstelephone, a land-line telephone, a control system, a camera, a scanner,a facsimile machine, a printer, a pager, a personal trusted device, aweb appliance, a network router, switch or bridge, or any other machinecapable of executing a set of instructions (sequential or otherwise)that specify actions to be taken by that machine. In a particularembodiment, the computer system 200 can be implemented using electronicdevices that provide voice, video or data communication. Further, whilea single computer system 200 is illustrated, the term “system” shallalso be taken to include any collection of systems or sub-systems thatindividually or jointly execute a set, or multiple sets, of instructionsto perform one or more computer functions.

As illustrated in FIG. 2, the computer system 200 may include aprocessor 202, e.g., a central processing unit (CPU), a graphicsprocessing unit (GPU), or both. The processor 202 may be a component ina variety of systems. For example, the processor 202 may be part of astandard personal computer or a workstation. The processor 202 may beone or more general processors, digital signal processors, specificallyconfigured processors, application specific integrated circuits, fieldprogrammable gate arrays, servers, networks, digital circuits, analogcircuits, combinations thereof, or other now known or later developeddevices for analyzing and processing data. The processor 202 mayimplement a software program, such as code generated manually (i.e.,programmed).

The computer system 200 may include a memory 204 that can communicatevia a bus 208. The memory 204 may be a main memory, a static memory, ora dynamic memory. The memory 204 may include, but is not limited to,computer readable storage media such as various types of volatile andnon-volatile storage media, including but not limited to random accessmemory, read-only memory, programmable read-only memory, electricallyprogrammable read-only memory, electrically erasable read-only memory,flash memory, magnetic tape or disk, optical media and the like. In oneembodiment, the memory 204 includes a cache or random access memory forthe processor 202. In alternative embodiments, the memory 204 isseparate from the processor 202, such as a cache memory of a processor,the system memory, or other memory. The memory 204 may be an externalstorage device or database for storing data. Examples include a harddrive, compact disc (“CD”), digital video disc (“DVD”), memory card,memory stick, floppy disc, universal serial bus (“USB”) memory device,or any other device operative to store data. The memory 204 is operableto store instructions executable by the processor 202. The functions,acts or tasks illustrated in the figures or described herein may beperformed by the programmed processor 202 executing the instructions 212stored in the memory 204. The functions, acts or tasks are independentof the particular type of instructions set, storage media, processor orprocessing strategy and may be performed by software, hardware,integrated circuits, firm-ware, micro-code and the like, operating aloneor in combination. Likewise, processing strategies may includemultiprocessing, multitasking, parallel processing and the like.

As shown, the computer system 200 may further include a display unit214, such as a liquid crystal display (LCD), an organic light emittingdiode (OLED), a flat panel display, a solid state display, a cathode raytube (CRT), a projector, a printer or other now known or later developeddisplay device for outputting determined information. The display 214may act as an interface for the user to see the functioning of theprocessor 202, or specifically as an interface with the software storedin the memory 204 or in the drive unit 206.

Additionally, the computer system 200 may include an input device 216configured to allow a user to interact with any of the components ofsystem 200. The input device 216 may be a number pad, a keyboard, or acursor control device, such as a mouse, or a joystick, touch screendisplay, remote control or any other device operative to interact withthe system 200.

In a particular embodiment, as depicted in FIG. 2, the computer system200 may also include a disk or optical drive unit 206. The disk driveunit 206 may include a computer-readable medium 210 in which one or moresets of instructions 212, e.g., software, can be embedded. Further, theinstructions 212 may embody one or more of the methods or logic asdescribed herein. In a particular embodiment, the instructions 212 mayreside completely, or at least partially, within the memory 204 and/orwithin the processor 202 during execution by the computer system 200.The memory 204 and the processor 202 also may include computer-readablemedia as discussed herein.

The present disclosure contemplates a computer-readable medium thatincludes instructions 212 or receives and executes instructions 212responsive to a propagated signal, so that a device connected to anetwork 220 can communicate voice, video, audio, images or any otherdata over the network 220. Further, the instructions 212 may betransmitted or received over the network 220 via a communicationinterface 218. The communication interface 218 may be a part of theprocessor 202 or may be a separate component. The communicationinterface 218 may be created in software or may be a physical connectionin hardware. The communication interface 218 is configured to connectwith a network 220, external media, the display 214, or any othercomponents in system 200, or combinations thereof. The connection withthe network 220 may be a physical connection, such as a wired Ethernetconnection or may be established wirelessly. Likewise, the additionalconnections with other components of the system 200 may be physicalconnections or may be established wirelessly.

The network 220 may include wired networks, wireless networks, orcombinations thereof. The wireless network may be a cellular telephonenetwork, an 802.11, 802.16, 802.20, or WiMax network. Further, thenetwork 220 may be a public network, such as the Internet, a privatenetwork, such as an intranet, or combinations thereof, and may utilize avariety of networking protocols now available or later developedincluding, but not limited to, TCP/IP based networking protocols.

Embodiments of the subject matter and the functional operationsdescribed in this specification can be implemented in digital electroniccircuitry, or in computer software, firmware, or hardware, including thestructures disclosed in this specification and their structuralequivalents, or in combinations of one or more of them. Embodiments ofthe subject matter described in this specification can be implemented asone or more computer program products, i.e., one or more modules ofcomputer program instructions encoded on a computer readable medium forexecution by, or to control the operation of, data processing apparatus.While the computer-readable medium is shown to be a single medium, theterm “computer-readable medium” includes a single medium or multiplemedia, such as a centralized or distributed database, and/or associatedcaches and servers that store one or more sets of instructions. The term“computer-readable medium” shall also include any medium that is capableof storing, encoding or carrying a set of instructions for execution bya processor or that cause a computer system to perform any one or moreof the methods or operations disclosed herein. The computer readablemedium can be a machine-readable storage device, a machine-readablestorage substrate, a memory device, or a combination of one or more ofthem. The term “data processing apparatus” encompasses all apparatus,devices, and machines for processing data, including by way of example aprogrammable processor, a computer, or multiple processors or computers.The apparatus can include, in addition to hardware, code that creates anexecution environment for the computer program in question, e.g., codethat constitutes processor firmware, a protocol stack, a databasemanagement system, an operating system, or a combination of one or moreof them.

In a particular non-limiting, exemplary embodiment, thecomputer-readable medium can include a solid-state memory such as amemory card or other package that houses one or more non-volatileread-only memories. Further, the computer-readable medium can be arandom access memory or other volatile re-writable memory. Additionally,the computer-readable medium can include a magneto-optical or opticalmedium, such as a disk or tapes or other storage device to capturecarrier wave signals such as a signal communicated over a transmissionmedium. A digital file attachment to an e-mail or other self-containedinformation archive or set of archives may be considered a distributionmedium that is a tangible storage medium. Accordingly, the disclosure isconsidered to include any one or more of a computer-readable medium or adistribution medium and other equivalents and successor media, in whichdata or instructions may be stored.

In an alternative embodiment, dedicated or otherwise specificallyconfigured hardware implementations, such as application specificintegrated circuits, programmable logic arrays and other hardwaredevices, can be constructed to implement one or more of the methodsdescribed herein. Applications that may include the apparatus andsystems of various embodiments can broadly include a variety ofelectronic and computer systems. One or more embodiments describedherein may implement functions using two or more specific interconnectedhardware modules or devices with related control and data signals thatcan be communicated between and through the modules, or as portions ofan application-specific integrated circuit. Accordingly, the presentsystem encompasses software, firmware, and hardware implementations.

In accordance with various embodiments of the present disclosure, themethods described herein may be implemented by software programsexecutable by a computer system. Further, in an exemplary, non-limitedembodiment, implementations can include distributed processing,component/object distributed processing, and parallel processing.Alternatively, virtual computer system processing can be constructed toimplement one or more of the methods or functionality as describedherein.

Although the present specification describes components and functionsthat may be implemented in particular embodiments with reference toparticular standards and protocols, the invention is not limited to suchstandards and protocols. For example, standards for Internet and otherpacket switched network transmission (e.g., TCP/IP, UDP/IP, HTML, HTTP,HTTPS) represent examples of the state of the art. Such standards areperiodically superseded by faster or more efficient equivalents havingessentially the same functions. Accordingly, replacement standards andprotocols having the same or similar functions as those disclosed hereinare considered equivalents thereof.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, and it can bedeployed in any form, including as a standalone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program can be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this specification can beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andanyone or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read only memory ora random access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto optical disks, or optical disks. However, a computerneed not have such devices. Moreover, a computer can be embedded inanother device, e.g., a mobile telephone, a personal digital assistant(PDA), a mobile audio player, a Global Positioning System (GPS)receiver, to name just a few. Computer readable media suitable forstoring computer program instructions and data include all forms ofnon-volatile memory, media and memory devices, including by way ofexample semiconductor memory devices, e.g., EPROM, EEPROM, and flashmemory devices; magnetic disks, e.g., internal hard disks or removabledisks; magneto optical disks; and CD ROM and DVD-ROM disks. Theprocessor and the memory can be supplemented by, or incorporated in,special purpose logic circuitry.

As used herein, the terms “microprocessor” or “general-purposeprocessor” (“GPP”) may refer to a hardware device that fetchesinstructions and data from a memory or storage device and executes thoseinstructions (for example, an Intel Xeon processor or an AMD Opteronprocessor) to then, for example, process the data in accordancetherewith. The term “reconfigurable logic” may refer to any logictechnology whose form and function can be significantly altered (i.e.,reconfigured) in the field post-manufacture as opposed to amicroprocessor, whose function can change post-manufacture, e.g. viacomputer executable software code, but whose form, e.g. thearrangement/layout and interconnection of logical structures, is fixedat manufacture. The term “software” may refer to data processingfunctionality that is deployed on a GPP. The term “firmware” may referto data processing functionality that is deployed on reconfigurablelogic. One example of a reconfigurable logic is a field programmablegate array (“FPGA”) which is a reconfigurable integrated circuit. AnFPGA may contain programmable logic components called “logic blocks”,and a hierarchy of reconfigurable interconnects that allow the blocks tobe “wired together”, somewhat like many (changeable) logic gates thatcan be inter-wired in (many) different configurations. Logic blocks maybe configured to perform complex combinatorial functions, or merelysimple logic gates like AND, OR, NOT and XOR. An FPGA may furtherinclude memory elements, which may be simple flip-flops or more completeblocks of memory.

To provide for interaction with a user, embodiments of the subjectmatter described in this specification can be implemented on a devicehaving a display, e.g., a CRT (cathode ray tube) or LCD (liquid crystaldisplay) monitor, for displaying information to the user and a keyboardand a pointing device, e.g., a mouse or a trackball, by which the usercan provide input to the computer. Other kinds of devices can be used toprovide for interaction with a user as well. Feedback provided to theuser can be any form of sensory feedback, e.g., visual feedback,auditory feedback, or tactile feedback. Input from the user can bereceived in any form, including acoustic, speech, or tactile input.

Embodiments of the subject matter described in this specification can beimplemented in a computing system that includes a back end component,e.g., a data server, or that includes a middleware component, e.g., anapplication server, or that includes a front end component, e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described in this specification, or any combination of one ormore such back end, middleware, or front end components. The componentsof the system can be interconnected by any form or medium of digitaldata communication, e.g., a communication network. Examples ofcommunication networks include a local area network (“LAN”) and a widearea network (“WAN”), e.g., the Internet.

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

It should be appreciated that the disclosed embodiments may beapplicable to other types of messages depending upon the implementation.Further, the messages may comprise one or more data packets, datagramsor other collection of data formatted, arranged configured and/orpackaged in a particular one or more protocols, e.g., the FIX protocol,TCP/IP, Ethernet, etc., suitable for transmission via a network 214 aswas described, such as the message format and/or protocols described inU.S. Pat. No. 7,831,491 and U.S. Patent Publication No. 2005/0096999 A1,both of which are incorporated by reference herein in their entiretiesand relied upon. Further, the disclosed message management system may beimplemented using an open message standard implementation, such as FIX,FIX Binary, FIX/FAST, or by an exchange-provided API.

The embodiments described herein utilize trade related electronicmessages such as mass quote messages, individual order messages,modification messages, cancellation messages, etc., so as to enacttrading activity in an electronic market. The trading entity and/ormarket participant may have one or multiple trading terminals associatedwith the session. Furthermore, the financial instruments may befinancial derivative products. Derivative products may include futurescontracts, options on futures contracts, futures contracts that arefunctions of or related to other futures contracts, swaps, swaptions, orother financial instruments that have their price related to or derivedfrom an underlying product, security, commodity, equity, index, orinterest rate product. In one embodiment, the orders are for optionscontracts that belong to a common option class. Orders may also be forbaskets, quadrants, other combinations of financial instruments, etc.The option contracts may have a plurality of strike prices and/orcomprise put and call contracts. A mass quote message may be received atan exchange. As used herein, an exchange computing system 100 includes aplace or system that receives and/or executes orders.

In an embodiment, a plurality of electronic messages is received fromthe network. The plurality of electronic messages may be received at anetwork interface for the electronic trading system. The plurality ofelectronic messages may be sent from market participants. The pluralityof messages may include order characteristics and be associated withactions to be executed with respect to an order that may be extractedfrom the order characteristics. The action may involve any action asassociated with transacting the order in an electronic trading system.The actions may involve placing the orders within a particular marketand/or order book of a market in the electronic trading system.

In an embodiment, an incoming transaction may be received. The incomingtransaction may be from, and therefore associated with, a marketparticipant of an electronic market managed by an electronic tradingsystem. The transaction may involve an order as extracted from areceived message, and may have an associated action. The actions mayinvolve placing an order to buy or sell a financial product in theelectronic market, or modifying or deleting such an order. In anembodiment, the financial product may be based on an associatedfinancial instrument which the electronic market is established totrade.

In an embodiment, the action associated with the transaction isdetermined. For example, it may be determined whether the incomingtransaction comprises an order to buy or sell a quantity of theassociated financial instrument or an order to modify or cancel anexisting order in the electronic market. Orders to buy or sell andorders to modify or cancel may be acted upon differently by theelectronic market. For example, data indicative of differentcharacteristics of the types of orders may be stored.

In an embodiment, data relating to the received transaction is stored.The data may be stored in any device, or using any technique, operableto store and provide recovery of data. For example, a memory 204 orcomputer readable medium 210, may be used to store data, as is describedwith respect to FIG. 2 in further detail herein. Data may be storedrelating received transactions for a period of time, indefinitely, orfor a rolling most recent time period such that the stored data isindicative of the market participant's recent activity in the electronicmarket.

If and/or when a transaction is determined to be an order to modify orcancel a previously placed, or existing, order, data indicative of theseactions may be stored. For example, data indicative of a running countof a number or frequency of the receipt of modify or cancel orders fromthe market participant may be stored. A number may be a total number ofmodify or cancel orders received from the market participant, or anumber of modify or cancel orders received from the market participantover a specified time. A frequency may be a time based frequency, as ina number of cancel or modify orders per unit of time, or a number ofcancel or modify orders received from the market participant as apercentage of total transactions received from the participant, whichmay or may not be limited by a specified length of time.

If and/or when a transaction is determined to be an order to buy or sella financial product, or financial instrument, other indicative data maybe stored. For example, data indicative of quantity and associated priceof the order to buy or sell may be stored.

Data indicative of attempts to match incoming orders may also be stored.The data may be stored in any device, or using any technique, operableto store and provide recovery of data. For example, a memory 204 orcomputer readable medium 210, may be used to store data, as is describedwith respect to FIG. 2. The acts of the process as described herein mayalso be repeated. As such, data for multiple received transactions formultiple market participants may be stored and used as describe herein.

The order processing module 118 may also store data indicative ofcharacteristics of the extracted orders. For example, the orderprocessing module may store data indicative of orders having anassociated modify or cancel action, such as by recording a count of thenumber of such orders associated with particular market participants.The order processing module may also store data indicative of quantitiesand associated prices of orders to buy or sell a product placed in themarket order book 110, as associated with particular marketparticipants.

Also, the order processing module 118 may be configured to calculate andassociate with particular orders a value indicative of an associatedmarket participant's market activity quality, which is a valueindicative of whether the market participant's market activity increasesor tends to increase liquidity of a market. This value may be determinedbased on the price of the particular order, previously stored quantitiesof orders from the associated market participant, the previously storeddata indicative of previously received orders to modify or cancel asassociated with the market participant, and previously stored dataindicative of a result of the attempt to match previously receivedorders stored in association with the market participant. The orderprocessing module 118 may determine or otherwise calculate scoresindicative of the quality value based on these stored extracted ordercharacteristics, such as an MQI as described herein.

Further, electronic trading systems may perform actions on orders placedfrom received messages based on various characteristics of the messagesand/or market participants associated with the messages. These actionsmay include matching the orders either during a continuous auctionprocess, or at the conclusion of a collection period during a batchauction process. The matching of orders may be by any technique.

The matching of orders may occur based on a priority indicated by thecharacteristics of orders and market participants associated with theorders. Orders having a higher priority may be matched before orders ofa lower priority. Such priority may be determined using varioustechniques. For example, orders that were indicated by messages receivedearlier may receive a higher priority to match than orders that wereindicated by messages received later. Also, scoring or grading of thecharacteristics may provide for priority determination. Data indicativeof order matches may be stored by a match engine and/or an orderprocessing module 118, and used for determining MQI scores of marketparticipants.

Example Users

Generally, a market may involve market makers, such as marketparticipants who consistently provide bids and/or offers at specificprices in a manner typically conducive to balancing risk, and markettakers who may be willing to execute transactions at prevailing bids oroffers may be characterized by more aggressive actions so as to maintainrisk and/or exposure as a speculative investment strategy. From analternate perspective, a market maker may be considered a marketparticipant who places an order to sell at a price at which there is nopreviously or concurrently provided counter order. Similarly, a markettaker may be considered a market participant who places an order to buyat a price at which there is a previously or concurrently providedcounter order. A balanced and efficient market may involve both marketmakers and market takers, coexisting in a mutually beneficial basis. Themutual existence, when functioning properly, may facilitate liquidity inthe market such that a market may exist with “tight” bid-ask spreads(e.g., small difference between bid and ask prices) and a “deep” volumefrom many currently provided orders such that large quantity orders maybe executed without driving prices significantly higher or lower.

As such, both market participant types are useful in generatingliquidity in a market, but specific characteristics of market activitytaken by market participants may provide an indication of a particularmarket participant's effect on market liquidity. For example, a MarketQuality Index (“MQI”) of an order may be determined using thecharacteristics. An MQI may be considered a value indicating alikelihood that a particular order will improve or facilitate liquidityin a market. That is, the value may indicate a likelihood that the orderwill increase a probability that subsequent requests and transactionfrom other market participants will be satisfied. As such, an MQI may bedetermined based on a proximity of the entered price of an order to amidpoint of a current bid-ask price spread, a size of the entered order,a volume or quantity of previously filled orders of the marketparticipant associated with the order, and/or a frequency ofmodifications to previous orders of the market participant associatedwith the order. In this way, an electronic trading system may functionto assess and/or assign an MQI to received electronic messages toestablish messages that have a higher value to the system, and thus thesystem may use computing resources more efficiently by expendingresources to match orders of the higher value messages prior toexpending resources of lower value messages.

While an MQI may be applied to any or all market participants, such anindex may also be applied only to a subset thereof, such as large marketparticipants, or market participants whose market activity as measuredin terms of average daily message traffic over a limited historical timeperiod exceeds a specified number. For example, a market participantgenerating more than 500, 1,000, or even 10,000 market messages per daymay be considered a large market participant.

An exchange provides one or more markets for the purchase and sale ofvarious types of products including financial instruments such asstocks, bonds, futures contracts, options, currency, cash, and othersimilar instruments. Agricultural products and commodities are alsoexamples of products traded on such exchanges. A futures contract is aproduct that is a contract for the future delivery of another financialinstrument such as a quantity of grains, metals, oils, bonds, currency,or cash. Generally, each exchange establishes a specification for eachmarket provided thereby that defines at least the product traded in themarket, minimum quantities that must be traded, and minimum changes inprice (e.g., tick size). For some types of products (e.g., futures oroptions), the specification further defines a quantity of the underlyingproduct represented by one unit (or lot) of the product, and deliveryand expiration dates. As will be described, the exchange may furtherdefine the matching algorithm, or rules, by which incoming orders willbe matched/allocated to resting orders.

Matching and Transaction Processing

Market participants, e.g., traders, use software to send orders ormessages to the trading platform. The order identifies the product, thequantity of the product the trader wishes to trade, a price at which thetrader wishes to trade the product, and a direction of the order (i.e.,whether the order is a bid, i.e., an offer to buy, or an ask, i.e., anoffer to sell). It will be appreciated that there may be other ordertypes or messages that traders can send including requests to modify orcancel a previously submitted order.

The exchange computer system monitors incoming orders received therebyand attempts to identify, i.e., match or allocate, as described herein,one or more previously received, but not yet matched, orders, i.e.,limit orders to buy or sell a given quantity at a given price, referredto as “resting” orders, stored in an order book database, wherein eachidentified order is contra to the incoming order and has a favorableprice relative to the incoming order. An incoming order may be an“aggressor” order, i.e., a market order to sell a given quantity atwhatever may be the current resting bid order price(s) or a market orderto buy a given quantity at whatever may be the current resting ask orderprice(s). An incoming order may be a “market making” order, i.e., amarket order to buy or sell at a price for which there are currently noresting orders. In particular, if the incoming order is a bid, i.e., anoffer to buy, then the identified order(s) will be an ask, i.e., anoffer to sell, at a price that is identical to or higher than the bidprice. Similarly, if the incoming order is an ask, i.e., an offer tosell, the identified order(s) will be a bid, i.e., an offer to buy, at aprice that is identical to or lower than the offer price.

An exchange computing system may receive conditional orders or messagesfor a data object, where the order may include two prices or values: areference value and a stop value. A conditional order may be configuredso that when a product represented by the data object trades at thereference price, the stop order is activated at the stop value. Forexample, if the exchange computing system's order management moduleincludes a stop order with a stop price of 5 and a limit price of 1 fora product, and a trade at 5 (i.e., the stop price of the stop order)occurs, then the exchange computing system attempts to trade at 1 (i.e.,the limit price of the stop order). In other words, a stop order is aconditional order to trade (or execute) at the limit price that istriggered (or elected) when a trade at the stop price occurs.

Stop orders also rest on, or are maintained in, an order book to monitorfor a trade at the stop price, which triggers an attempted trade at thelimit price. In some embodiments, a triggered limit price for a stoporder may be treated as an incoming order.

Upon identification (matching) of a contra order(s), a minimum of thequantities associated with the identified order and the incoming orderis matched and that quantity of each of the identified and incomingorders become two halves of a matched trade that is sent to a clearinghouse. The exchange computer system considers each identified order inthis manner until either all of the identified orders have beenconsidered or all of the quantity associated with the incoming order hasbeen matched, i.e., the order has been filled. If any quantity of theincoming order remains, an entry may be created in the order bookdatabase and information regarding the incoming order is recordedtherein, i.e., a resting order is placed on the order book for theremaining quantity to await a subsequent incoming order counter thereto.

It should be appreciated that in electronic trading systems implementedvia an exchange computing system, a trade price (or match value) maydiffer from (i.e., be better for the submitter, e.g., lower than asubmitted buy price or higher than a submitted sell price) the limitprice that is submitted, e.g., a price included in an incoming message,or a triggered limit price from a stop order.

As used herein, “better” than a reference value means lower than thereference value if the transaction is a purchase (or acquire)transaction, and higher than the reference value if the transaction is asell transaction. Said another way, for purchase (or acquire)transactions, lower values are better, and for relinquish or selltransactions, higher values are better.

Traders access the markets on a trading platform using trading softwarethat receives and displays at least a portion of the order book for amarket, i.e., at least a portion of the currently resting orders,enables a trader to provide parameters for an order for the producttraded in the market, and transmits the order to the exchange computersystem. The trading software typically includes a graphical userinterface to display at least a price and quantity of some of theentries in the order book associated with the market. The number ofentries of the order book displayed is generally preconfigured by thetrading software, limited by the exchange computer system, or customizedby the user. Some graphical user interfaces display order books ofmultiple markets of one or more trading platforms. The trader may be anindividual who trades on his/her behalf, a broker trading on behalf ofanother person or entity, a group, or an entity. Furthermore, the tradermay be a system that automatically generates and submits orders.

If the exchange computer system identifies that an incoming market ordermay be filled by a combination of multiple resting orders, e.g., theresting order at the best price only partially fills the incoming order,the exchange computer system may allocate the remaining quantity of theincoming, i.e., that which was not filled by the resting order at thebest price, among such identified orders in accordance withprioritization and allocation rules/algorithms, referred to as“allocation algorithms” or “matching algorithms,” as, for example, maybe defined in the specification of the particular financial product ordefined by the exchange for multiple financial products. Similarly, ifthe exchange computer system identifies multiple orders contra to theincoming limit order and that have an identical price which is favorableto the price of the incoming order, i.e., the price is equal to orbetter, e.g., lower if the incoming order is a buy (or instruction topurchase, or instruction to acquire) or higher if the incoming order isa sell (or instruction to relinquish), than the price of the incomingorder, the exchange computer system may allocate the quantity of theincoming order among such identified orders in accordance with thematching algorithms as, for example, may be defined in the specificationof the particular financial product or defined by the exchange formultiple financial products.

An exchange responds to inputs, such as trader orders, cancellation,etc., in a manner as expected by the market participants, such as basedon market data, e.g., prices, available counter-orders, etc., to providean expected level of certainty that transactions will occur in aconsistent and predictable manner and without unknown or unascertainablerisks. Accordingly, the method by which incoming orders are matched withresting orders must be defined so that market participants have anexpectation of what the result will be when they place an order or haveresting orders and an incoming order is received, even if the expectedresult is, in fact, at least partially unpredictable due to somecomponent of the process being random or arbitrary or due to marketparticipants having imperfect or less than all information, e.g.,unknown position of an order in an order book. Typically, the exchangedefines the matching/allocation algorithm that will be used for aparticular financial product, with or without input from the marketparticipants. Once defined for a particular product, thematching/allocation algorithm is typically not altered, except inlimited circumstance, such as to correct errors or improve operation, soas not to disrupt trader expectations. It will be appreciated thatdifferent products offered by a particular exchange may use differentmatching algorithms.

For example, a first-in/first-out (FIFO) matching algorithm, alsoreferred to as a “Price Time” algorithm, considers each identified ordersequentially in accordance with when the identified order was received.The quantity of the incoming order is matched to the quantity of theidentified order at the best price received earliest, then quantities ofthe next earliest best price orders, and so on until the quantity of theincoming order is exhausted. Some product specifications define the useof a pro-rata matching algorithm, wherein a quantity of an incomingorder is allocated to each of plurality of identified ordersproportionally. Some exchange computer systems provide a priority tocertain standing orders in particular markets. An example of such anorder is the first order that improves a price (i.e., improves themarket) for the product during a trading session. To be given priority,the trading platform may require that the quantity associated with theorder is at least a minimum quantity. Further, some exchange computersystems cap the quantity of an incoming order that is allocated to astanding order on the basis of a priority for certain markets. Inaddition, some exchange computer systems may give a preference to orderssubmitted by a trader who is designated as a market maker for theproduct. Other exchange computer systems may use other criteria todetermine whether orders submitted by a particular trader are given apreference. Typically, when the exchange computer system allocates aquantity of an incoming order to a plurality of identified orders at thesame price, the trading host allocates a quantity of the incoming orderto any orders that have been given priority. The exchange computersystem thereafter allocates any remaining quantity of the incoming orderto orders submitted by traders designated to have a preference, and thenallocates any still remaining quantity of the incoming order using theFIFO or pro-rata algorithms. Pro-rata algorithms used in some marketsmay require that an allocation provided to a particular order inaccordance with the pro-rata algorithm must meet at least a minimumallocation quantity. Any orders that do not meet or exceed the minimumallocation quantity are allocated to on a FIFO basis after the pro-rataallocation (if any quantity of the incoming order remains). Moreinformation regarding order allocation may be found in U.S. Pat. No.7,853,499, the entirety of which is incorporated by reference herein andrelied upon. Other examples of matching algorithms which may be definedfor allocation of orders of a particular financial product include:Price Explicit Time; Order Level Pro Rata; Order Level Priority ProRata; Preference Price Explicit Time; Preference Order Level Pro Rata;Preference Order Level Priority Pro Rata; Threshold Pro-Rata; PriorityThreshold Pro-Rata; Preference Threshold Pro-Rata; Priority PreferenceThreshold Pro-Rata; and Split Price-Time Pro-Rata, which are describedin U.S. patent application Ser. No. 13/534,499, filed on Jun. 27, 2012,entitled “Multiple Trade Matching Algorithms,” published as U.S. PatentApplication Publication No. 2014/0006243 A1, the entirety of which isincorporated by reference herein and relied upon.

With respect to incoming orders, some traders, such as automated and/oralgorithmic traders, attempt to respond to market events, such as tocapitalize upon a mispriced resting order or other market inefficiency,as quickly as possible. This may result in penalizing the trader whomakes an errant trade, or whose underlying trading motivations havechanged, and who cannot otherwise modify or cancel their order fasterthan other traders can submit trades there against. It may consideredthat an electronic trading system that rewards the trader who submitstheir order first creates an incentive to either invest substantialcapital in faster trading systems, participate in the marketsubstantially to capitalize on opportunities (aggressor side/lower risktrading) as opposed to creating new opportunities (market making/higherrisk trading), modify existing systems to streamline business logic atthe cost of trade quality, or reduce one's activities and exposure inthe market. The result may be a lesser quality market and/or reducedtransaction volume, and corresponding thereto, reduced fees to theexchange.

With respect to resting orders, allocation/matching suitable restingorders to match against an incoming order can be performed, as describedherein, in many different ways. Generally, it will be appreciated thatallocation/matching algorithms are only needed when the incoming orderquantity is less than the total quantity of the suitable resting ordersas, only in this situation, is it necessary to decide which restingorder(s) will not be fully satisfied, which trader(s) will not get theirorders filled. It can be seen from the above descriptions of thematching/allocation algorithms, that they fall generally into threecategories: time priority/first-in-first-out (“FIFO”), pro rata, or ahybrid of FIFO and pro rata.

FIFO generally rewards the first trader to place an order at aparticular price and maintains this reward indefinitely. So if a traderis the first to place an order at price X, no matter how long that orderrests and no matter how many orders may follow at the same price, assoon as a suitable incoming order is received, that first trader will bematched first. This “first mover” system may commit other traders topositions in the queue after the first move traders. Furthermore, whileit may be beneficial to give priority to a trader who is first to placean order at a given price because that trader is, in effect, taking arisk, the longer that the trader's order rests, the less beneficial itmay be. For instance, it could deter other traders from adding liquidityto the marketplace at that price because they know the first mover (andpotentially others) already occupies the front of the queue.

With a pro rata allocation, incoming orders are effectively split amongsuitable resting orders. This provides a sense of fairness in thateveryone may get some of their order filled. However, a trader who tooka risk by being first to place an order (a “market turning” order) at aprice may end up having to share an incoming order with a much latersubmitted order. Furthermore, as a pro rata allocation distributes theincoming order according to a proportion based on the resting orderquantities, traders may place orders for large quantities, which theyare willing to trade but may not necessarily want to trade, in order toincrease the proportion of an incoming order that they will receive.This results in an escalation of quantities on the order book andexposes a trader to a risk that someone may trade against one of theseorders and subject the trader to a larger trade than they intended. Inthe typical case, once an incoming order is allocated against theselarge resting orders, the traders subsequently cancel the remainingresting quantity which may frustrate other traders. Accordingly, as FIFOand pro rata both have benefits and problems, exchanges may try to usehybrid allocation/matching algorithms which attempt to balance thesebenefits and problems by combining FIFO and pro rata in some manner.However, hybrid systems define conditions or fixed rules to determinewhen FIFO should be used and when pro rata should be used. For example,a fixed percentage of an incoming order may be allocated using a FIFOmechanism with the remainder being allocated pro rata.

Order Book Object Data Structures

In one embodiment, the messages and/or values received for each objectmay be stored in queues according to value and/or priority techniquesimplemented by an exchange computing system 100. FIG. 3 illustrates anexample data structure 300, which may be stored in a memory or otherstorage device, such as the memory 204 or storage device 206 describedwith respect to FIG. 2, for storing and retrieving messages related todifferent values for the same action for an object. For example, datastructure 300 may be a set of queues or linked lists for multiple valuesfor an action, e.g., bid, on an object. Data structure 300 may beimplemented as a database. It should be appreciated that the system maystore multiple values for the same action for an object, for example,because multiple users submitted messages to buy specified quantities ofan object at different values. Thus, in one embodiment, the exchangecomputing system may keep track of different orders or messages forbuying or selling quantities of objects at specified values.

Although the present patent application contemplates using queue datastructures for storing messages in a memory, the implementation mayinvolve additional pointers, i.e., memory address pointers, or linkingto other data structures. Incoming messages may be stored at anidentifiable memory address. The transaction processor can traversemessages in order by pointing to and retrieving different messages fromthe different memories. Thus, messages that may be depicted sequentiallymay actually be stored in memory in disparate locations. The softwareprograms implementing the transaction processing may retrieve andprocess messages in sequence from the various disparate (e.g., random)locations. Thus, in one embodiment, each queue may store differentvalues, which could represent prices, where each value points to or islinked to the messages (which may themselves be stored in queues andsequenced according to priority techniques, such as prioritizing byvalue) that will match at that value. For example, as shown in FIG. 3,all of the values relevant to executing an action at different valuesfor an object are stored in a queue. Each value in turn points to, e.g.,a linked list or queue logically associated with the values. The linkedlist stores the messages that instruct the exchange computing system tobuy specified quantities of the object at the corresponding value.

Transaction Processor Data Structures

FIG. 4 illustrates an example embodiment of a data structure used toimplement match engine module 106. Match engine module 106 may include aconversion component 402, pre-match queue 404, match component 406,post-match queue 408 and publish component 410.

Although the embodiments are disclosed as being implemented in queues,it should be understood that different data structures, such as forexample linked lists or trees, may also be used. Although theapplication contemplates using queue data structures for storingmessages in a memory, the implementation may involve additionalpointers, i.e., memory address pointers, or linking to other datastructures. Thus, in one embodiment, each incoming message may be storedat an identifiable memory address. The transaction processing componentscan traverse messages in order by pointing to and retrieving differentmessages from the different memories. Thus, messages that may beprocessed sequentially in queues may actually be stored in memory indisparate locations. The software programs implementing the transactionprocessing may retrieve and process messages in sequence from thevarious disparate (e.g., random) locations.

The queues described herein may, in one embodiment, be structured sothat the messages are stored in sequence according to time of receipt,e.g., they may be first-in/first-out (FIFO) queues.

The match engine module 106 may be an example of a transactionprocessing system. The pre-match queue 404 may be an example of apre-transaction queue. The match component 406 may be an example of atransaction component. The post-match queue 408 may be an example of apost-transaction queue. The publish component 410 may be an example of adistribution component. The transaction component may process messagesand generate transaction component results.

It should be appreciated that match engine module 106 may not includeall of the components described herein. For example, match engine module106 may only include pre-match queue 404 and match component 406, asshown in FIG. 4B. In one embodiment, the latency detection system maydetect how long a message waits in a pre-match queue 404 (e.g.,latency), and compares the latency to the maximum allowable latencyassociated with the message.

In one embodiment, the publish component may be a distribution componentthat can distribute data to one or more market participant computers. Inone embodiment, match engine module 106 operates according to afirst-in/first-out (FIFO) ordering. The conversion component 402converts or extracts a message received from a trader via the MarketSegment Gateway or MSG into a message format that can be input into thepre-match queue 404.

Messages from the pre-match queue may enter the match component 406sequentially and may be processed sequentially. In one regard, thepre-transaction queue, e.g., the pre-match queue, may be considered tobe a buffer or waiting spot for messages before they can enter and beprocessed by the transaction component, e.g., the match component. Thematch component matches orders, and the time a messages spends beingprocessed by the match component can vary, depending on the contents ofthe message and resting orders on the book. Thus, newly receivedmessages wait in the pre-transaction queue until the match component isready to process those messages. Moreover, messages are received andprocessed sequentially or in a first-in, first-out FIFO methodology. Thefirst message that enters the pre-match or pre-transaction queue will bethe first message to exit the pre-match queue and enter the matchcomponent. In one embodiment, there is no out-of-order messageprocessing for messages received by the transaction processing system.The pre-match and post-match queues are, in one embodiment, fixed insize, and any messages received when the queues are full may need towait outside the transaction processing system or be re-sent to thetransaction processing system.

The match component 406 processes an order or message, at which pointthe transaction processing system may consider the order or message ashaving been processed. The match component 406 may generate one messageor more than one message, depending on whether an incoming order wassuccessfully matched by the match component. An order message thatmatches against a resting order in the order book may generate dozens orhundreds of messages. For example, a large incoming order may matchagainst several smaller resting orders at the same price level. Forexample, if many orders match due to a new order message, the matchengine needs to send out multiple messages informing traders whichresting orders have matched. Or, an order message may not match anyresting order and only generate an acknowledgement message. Thus, thematch component 406 in one embodiment will generate at least onemessage, but may generate more messages, depending upon the activitiesoccurring in the match component. For example, the more orders that arematched due to a given message being processed by the match component,the more time may be needed to process that message. Other messagesbehind that given message will have to wait in the pre-match queue.

Messages resulting from matches in the match component 406 enter thepost-match queue 408. The post-match queue may be similar infunctionality and structure to the pre-match queue discussed above,e.g., the post-match queue is a FIFO queue of fixed size. As illustratedin FIG. 4, a difference between the pre- and post-match queues may bethe location and contents of the structures, namely, the pre-match queuestores messages that are waiting to be processed, whereas the post-matchqueue stores match component results due to matching by the matchcomponent. The match component receives messages from the pre-matchqueue, and sends match component results to the post-match queue. In oneembodiment, the time that results messages, generated due to thetransaction processing of a given message, spend in the post-match queueis not included in the latency calculation for the given message.

Messages from the post-match queue 408 enter the publish component 410sequentially and are published via the MSG sequentially. Thus, themessages in the post-match queue 408 are an effect or result of themessages that were previously in the pre-match queue 404. In otherwords, messages that are in the pre-match queue 404 at any given timewill have an impact on or affect the contents of the post-match queue408, depending on the events that occur in the match component 406 oncethe messages in the pre-match queue 404 enter the match component 406.

As noted above, the match engine module 106 in one embodiment operatesin a first-in, first-out (FIFO) scheme. In other words, the firstmessage that enters the match engine module 106 is the first messagethat is processed by the match engine module 106. Thus, the match enginemodule 106 in one embodiment processes messages in the order themessages are received. In FIG. 4, as shown by the data flow arrow, datais processed sequentially by the illustrated structures from left toright, beginning at the conversion component 402, to the pre-matchqueue, to the match component 406, to the post-match queue 408, and tothe publish component 410. The overall transaction processing systemoperates in a FIFO scheme such that data flows from element 402 to 404to 406 to 408 to 410, in that order. If any one of the queues orcomponents of the transaction processing system experiences a delay,that creates a backlog for the structures preceding the delayedstructure. For example, if the match or transaction component isundergoing a high processing volume, and if the pre-match orpre-transaction queue is full of messages waiting to enter the match ortransaction component, the conversion component may not be able to addany more messages to the pre-match or pre-transaction queue.

Messages wait in the pre-match queue. The time a message waits in thepre-match queue depends upon how many messages are ahead of that message(i.e., earlier messages), and how much time each of the earlier messagesspends being serviced or processed by the match component. Messages alsowait in the post-match queue. The time a message waits in the post-matchqueue depends upon how many messages are ahead of that message (i.e.,earlier messages), and how much time each of the earlier messages spendsbeing serviced or processed by the publish component. These wait timesmay be viewed as a latency that can affect a market participant'strading strategy.

After a message is published (after being processed by the componentsand/or queues of the match engine module), e.g., via a market data feed,the message becomes public information and is publicly viewable andaccessible. Traders consuming such published messages may act upon thosemessage, e.g., submit additional new input messages to the exchangecomputing system responsive to the published messages.

The match component attempts to match aggressing or incoming ordersagainst resting orders. If an aggressing order does not match anyresting orders, then the aggressing order may become a resting order, oran order resting on the books. For example, if a message includes a neworder that is specified to have a one-year time in force, and the neworder does not match any existing resting order, the new order willessentially become a resting order to be matched (or attempted to bematched) with some future aggressing order. The new order will thenremain on the books for one year. On the other hand, an order specifiedas a fill or kill (e.g., if the order cannot be filled or matched withan order currently resting on the books, the order should be canceled)will never become a resting order, because it will either be filled ormatched with a currently resting order, or it will be canceled. Theamount of time needed to process or service a message once that messagehas entered the match component may be referred to as a service time.The service time for a message may depend on the state of the orderbooks when the message enters the match component, as well as thecontents, e.g., orders, that are in the message.

In one embodiment, orders in a message are considered to be “locked in”,or processed, or committed, upon reaching and entering the matchcomponent. If the terms of the aggressing order match a resting orderwhen the aggressing order enters the match component, then theaggressing order will be in one embodiment guaranteed to match.

As noted above, the latency experienced by a message, or the amount oftime a message spends waiting to enter the match component, depends uponhow many messages are ahead of that message (i.e., earlier messages),and how much time each of the earlier messages spends being serviced orprocessed by the match component. The amount of time a match componentspends processing, matching or attempting to match a message dependsupon the type of message, or the characteristics of the message. Thetime spent inside the processor may be considered to be a service time,e.g., the amount of time a message spends being processed or serviced bythe processor.

The number of matches or fills that may be generated in response to anew order message for a financial instrument will depend on the state ofthe data object representing the electronic marketplace for thefinancial instrument. The state of the match engine can change based onthe contents of incoming messages.

It should be appreciated that the match engine's overall latency is inpart a result of the match engine processing the messages it receives.The match component's service time may be a function of the message type(e.g., new, modify, cancel), message arrival rate (e.g., how many ordersor messages is the match engine module receiving, e.g., messages persecond), message arrival time (e.g., the time a message hits the inboundMSG or market segment gateway), number of fills generated (e.g., howmany fills were generated due to a given message, or how many ordersmatched due to an aggressing or received order), or number of Mass Quoteentries (e.g., how many of the entries request a mass quote).

In one embodiment, the time a message spends:

Being converted in the conversion component 402 may be referred to as aconversion time;

Waiting in the pre-match queue 404 may be referred to as a wait untilmatch time;

Being processed or serviced in the match component 406 may be referredto as a matching time;

Waiting in the post-match queue 408 may be referred to as a wait untilpublish time; and

Being processed or published via the publish component 410 may bereferred to as a publishing time.

It should be appreciated that the latency may be calculated, in oneembodiment, as the sum of the conversion time and wait until match time.Or, the system may calculate latency as the sum of the conversion time,wait until match time, matching time, wait until publish time, andpublishing time. In systems where some or all of those times arenegligible, or consistent, a measured latency may only include the sumof some of those times. Or, a system may be designed to only calculateone of the times that is the most variable, or that dominates (e.g.,percentage wise) the overall latency. For example, some marketparticipants may only care about how long a newly sent message that isadded to the end of the pre-match queue will spend waiting in thepre-match queue. Other market participants may care about how long thatmarket participant will have to wait to receive an acknowledgement fromthe match engine that a message has entered the match component. Yetother market participants may care about how much time will pass fromwhen a message is sent to the match engine's conversion component towhen match component results exit or egress from the publish component.

Partitioned Streaming Platform

As described above, an exchange computing system generates a largevolume of data, e.g., market data feeds that may contain electronic datatransaction result messages. FIG. 5 illustrates an example exchangecomputing system 100 that includes multiple data producers, e.g., matchengines 502, 504 and 506. Each match engine may process, e.g., attemptto match, electronic data transaction request messages that includerequests to transact on a financial instrument traded on that matchengine. Upon processing an electronic data transaction request message,each match engine produces electronic data transaction result messages.The output messages, i.e., the electronic data transaction resultmessages, may include time signal data, which may be based on a systemclock 508 of system 100, or a system clock associated with each matchengine, or any type of sequential counter. The clock 508 may be ahardware unit, such as Solarflare Precision Time Protocol (PTP)™hardware. Clock 508 provides a single source of time, which may be usedto augment electronic data transaction result messages with time signaldata, e.g., to impart an order or sequence of the electronic datatransaction result messages. The clock 508 may be referred to herein asan orderer. For more detail on ordering messages in an exchangecomputing system, see U.S. patent application Ser. No. 15/232,224, filedon Aug. 9, 2016, entitled “Systems and Methods for CoordinatingProcessing of Instructions Across Multiple Components”, the entirety ofwhich is incorporated by reference herein and relied upon.

Alternatively, if the exchange computing system does not include aclock, the streaming platform may be equipped with a sequencing device.For example, a sequencing device may be coupled to the streamingplatform. Data transmitted/streamed to the streaming platform by dataproducers is augmented, by the sequencing device, with sequencing data.When the data is read by the streaming platform reader, the streamingplatform reader uses sequencing information in the messages to order thedata across multiple partitions as described herein. In one embodiment,a method of implementing a streaming platform reader includes augmentingdata transmitted to a streaming platform with sequencing data, e.g.timestamps.

Data produced by an enterprise system such as exchange computing system100 may be used in a variety of ways. For example, data may betransmitted from the match engines, i.e., data producers, to multipledata recipients or data consumers, such as a data warehouse 510, or to abackup system 512.

The match engine output data may also be streamed, either in real timeas it is generated or from a historical repository of previouslygenerated data, to a streaming platform 514. As described above, astreaming platform, such as Kafka, centralizes communication betweenproducers of data and consumers of that data. A streaming platform mayorganize data, or messages containing data, into topics or categories. Auser of the streaming platform, e.g., exchange computing system 100,determines how many topics or categories are used to organize the data.A producer pushes messages into a Kafka topic, and a consumer pullsmessages from a Kafka topic.

Kafka stores topics in partitions. Partitioning a topic allows a Kafkauser, e.g., the exchange computing system, to spread data for atopic/category across multiple servers or disks, i.e., for scalabilityand/or redundancy purposes. For example, each partition can be placed ona separate machine to allow for multiple consumers to read from a topicin parallel. Each partition can be hosted on a different server, whichmeans that a single topic can be scaled horizontally across multipleservers to provide performance far beyond the ability of a singleserver. Consumers can also be parallelized so that multiple consumerscan read from multiple partitions in a topic, allowing for very highmessage processing throughput. Partitioning also enables parallelizingproducer writes to the streaming platform. Facilitating parallel writingand consumption enables faster, more reliable data streaming.

In the example of FIG. 5, streaming platform 514 receives data fromproducers, e.g. match engines, 502, 504, 506. The exchange computingsystem 100 may be configured so that each producer's output is aseparate topic, thus making it easy for consumers to selectively readdata related to a particular match engine.

As shown in FIG. 5, the exchange computing system may be configured sothat one topic is stored in one partition. For example, match engine 502produces data for topic 1 which is streamed to partition 516, matchengine 504 produces data for topic 2 which is streamed to partition 518,and match engine 506 produces data for topic 3 which is streamed topartition 520. In one embodiment, the data is encrypted/encoded prior tobeing stored in a partition.

For example, some traders may only trade financial instruments that areprocessed by match engine 502. Such a trader, e.g., consumer 520, wouldsubscribe to or consume data from partition 516. Or, some applications,e.g., application 522, may wish to consume data associated with matchengines 504 and 506, and would accordingly consume data from topicsstored in partitions 518 and 520, respectively.

Again, although each topic is only written to one partition, becauseKafka allows for parallel reading from multiple partitions, the exchangecomputing system can stream data from streaming platform 514 with a veryhigh messaging throughput.

FIG. 6 illustrates example streaming platform partitions in additionaldetail. Each partition contains an ordered, immutable sequence ofmessages. As new messages are sent to a particular partition, the newmessages are appended to the partition. Position 0 in a partition storesthe oldest/earliest message received by that partition.

The messages in the partitions are each assigned a sequentialidentification number called the offset that uniquely identifies eachmessage within the partition. Consumers can read messages starting froma specific offset and are allowed to read from any offset point.Streaming platform architectures, such as Kafka, typically guaranteethat messages written to a partition by a producer in a specific orderor sequence will be read by a consumer in that same order or sequence.Accordingly, the partitions are first in first (FIFO) partitions, sothat messages streamed to a partition in a sequence are retrieved fromthe partition in the same sequence. However, streaming platformarchitectures such as Kafka cannot guarantee that data/messages readacross multiple partitions by a consumer are ordered in the same orderor sequence in which the messages were transmitted by the producers tothe streaming platform 514, or in the same order in which the messageswere received by the streaming platform 514.

As described elsewhere, in deterministic systems, such as an electronictrading system implemented by the exchange computing system 100, theorder of transactions/messages may be important for both ensuringintegrity and expected operation of markets implemented thereby and forensuring that system states, a product of the transactions processedthereby, may be accurately reproduced.

Streaming Platform Reader

Data consumers of a streaming platform may require that the messages areconsumed in the order that they are published to (e.g., transmitted to)the streaming platform by all of the data producers, and not just in theorder transmitted by any one producer. When a consumer only reads datafrom one partition, Kafka's architecture as described in connection withFIG. 6 guarantees that the data will be read in order, i.e.intra-partition order is maintained. However, some consumers may consumemore than one of the topics, requiring that consumer to read multiplepartitions. For example, referring back to FIG. 5, some applications,such as a streaming application 526, or an auditing system 528, mayconsume messages across all the topics (and thus partitions) stored inthe streaming platform 514. Moreover, the consuming application mayrequire that the messages be consumed in the order imparted on themessages by clock 508, before the messages were separated/stored indifferent partitions. In other words, the consuming application mayrequire all the messages, regardless of which partition they arestreamed from, to be read in the same order they were generated by thedifferent producers, i.e. maintenance of inter-partition ordering isnecessary.

Alternatively, or additionally, in one embodiment, the consumingapplication may require that all the messages, regardless of whichpartition they are streamed from, to be read in the same order they werepublished to the streaming platform 514.

In one embodiment, streaming platform reader 524 guarantees thatmessages are consumed from the streaming platform 514 in the order theywere published to the streaming platform 514. Even messages that belongto different topics, i.e., streamed from different partitions ofstreaming platform 514, are consumed by the streaming platform reader524 in the order in which they were published to the streaming platform514. The streaming platform reader 524 may, if necessary, post processthe message content and subsequently may copy/write the messages to adisk/memory 204 before the data can be used by consuming applications,such as streaming application 526, or auditing system 528.

As described above, in one embodiment, the streaming platform reader mayattempt to retrieve messages as quickly as possible, to ensure a highstreaming throughput. In one embodiment, the message, once read, is notdeleted from the partition and is instead denoted as having been ready,e.g. the offset pointer of the partition is incremented to point to thenext message, wherein once the current offset position indicates thatall messages have been read with no new messages produced to thepartition since the reader last read a message, e.g. offset reaches thelast “committed position,” an end of partition signal is communicated tothe reader. In one embodiment, the end of partition signal is only sentthe first time the reader attempts to read messages when there are nomore messages to be read, wherein subsequent attempts while therecontinue to be no new messages to read result in a time out. The readerwill continue to attempt to read messages until there is new messageavailable. In one embodiment, partitions may be periodically cleared,e.g. on a defined scheduled and/or when the system is taken off line formaintenance of testing. In an alternative embodiment, when a message isretrieved from a partition, it no longer exists in the partition, i.e.,it is deleted from the partition. In one embodiment, messages retrievedfrom the partition may be moved to an archive, not shown, forbackup/disaster recovery purposes. Accordingly, if a streaming platformreader reads all the messages from a partition, and the partition doesnot subsequently receive any new messages, then the partition will beempty.

In one implementation, the streaming platform reader 524 may readmessages out of the archive as if reading them from the partitions, suchas for recovery or restoring operation after a fault. It will beappreciated that reading messages from the archive may not be exactlythe same as reading messages from partitions. In particular, messagesmay be published to the partitions, and subsequently read out by thestreaming platform reader 524, in real time, i.e. as they are generatedby the data producers, e.g. match engines, 502, 504, 506. As such, thevolume of messages may vary over time and between partitions. In somecases, at certain times some partitions may have significant messageactivity while other partitions see little to no activity. In contrast,when reading from the archive, where previously published messages arestored, messages may be read out as quickly as permitted by the capacityof the system, with no variation in volume over time or acrosspartitions, until the archive is exhausted.

FIG. 7 illustrates a block diagram of a system 700 including dataproducers 502, 504 and 506 that stream data messages to streamingplatform 514. System 700 includes example streaming platform reader 524that reads messages from streaming platform 514.

Streaming platform 514, as described above, may include partitions 516,518 and 510, and may be configured to stream messages to streamingplatform reader 524. Streaming platform 514 may be configured totransmit an end of partition signal to the reader application 702 if apartition is empty, i.e., does not contain any messages. For example,the Apache Kafka protocol includes a FetchRequest/Response applicationprogramming interface (API) that returns a HighwaterMarkOffset value,which is an end of partition signal. A partition that transmits an endof partition signal to the reader application may, after transmittingthe end of partition signal, receive a message from a data producer.

Streaming platform reader 524 includes a reader application 702, which,in one embodiment, may be a multithreaded application, and which may beimplemented as a separate component or as one or more logic components,such as on an FPGA which may include a memory or reconfigurablecomponent to store logic and processing component to execute the storedlogic, e.g. computer program logic, stored in a memory 204, or othernon-transitory computer readable medium, and where each of the threads,referred to as reading, reader or poller threads, is concurrentlyexecutable by a processor 202, such as the processor 202 and memory 204described with respect to FIG. 2, to cause the processor 202 to retrievemessages from each of the partitions of the streaming platform 514. Inone embodiment, each of the reading threads may be configured to readfrom one partition assigned thereto, i.e., one thread to one partition.A multithreaded reader application allows the reader to retrievemessages from partitions as quickly as possible. As noted above, readmessages are not removed from the partition but are, instead, denoted ashaving been read, e.g. the offset indicative of the next new message tobe read is incremented until it reaches the last new message at thattime. In an alternative embodiment, if new messages are added to thepartition as old messages are read out, the new messages will remain inthe partition until they are also read/retrieved by the readerapplication 702. In one embodiment, each reader thread essentiallyoperates in a continuous or infinite loop reading/attempting to readfrom its associated partition.

Streaming platform reader 524 includes a vector of queues 704, whereeach queue is a first-in first-out (FIFO) queue that stores messageretrieved by the multithreaded reader application 702. In oneembodiment, each queue is implemented as a ring buffer. Each of thequeues includes a first position where the earliest/first messages arestored and from where messages are read as discussed below. A queue maycontain or be associated with an end of partition signal if theassociated partition is empty. In one embodiment, each queue may be lockfree, i.e. allowing data to be read from the queue by a single readerthread while data is being written to the queue by a single writerthread.

The producers 502, 504, 506 may be continuously streaming data to thestreaming platform 514, which may then be consumed by consumers such asthe auditing system 100. The production rate, or the rate at whichmessages are streamed to the streaming platform, may vary from theconsumption rate, or the rate at which messages are streamed from thestreaming platform.

Each reader thread may retrieve messages from its associated partitionindependently of other reader threads. Thus, different queues may havedifferent numbers of messages, and the queues may build up messages atdifferent rates, depending on the rate of retrieval of the individualreader threads, such as may occur in real time operation. Inimplementations where the messages contain encrypted/encoded content, orcontent which otherwise requires some form of post processing, such asderivation, translation, conversion or transformation, each readerthread further performs the requisite post processing, e.g. decoding ordecrypting, of the message content prior to storing the message contentin the queues 704.

It should be appreciated that a queue 704 may not contain a message forone of two reasons. A queue may not include a message because thecorresponding partition from which that queue receives messages isempty. Or, a queue may not include a message because the reader threadassociated with that queue is in the process of retrieving a messagefrom the corresponding partition from which that queue receivesmessages.

Streaming platform reader 524 includes gate control logic 706, which maybe implemented as a separate component or as one or more logiccomponents, such as on an FPGA which may include a memory orreconfigurable component to store logic and processing component toexecute the stored logic, e.g. computer program logic, stored in amemory 204, or other non-transitory computer readable medium, andexecutable by a processor 202, such as the processor 202 and memory 204described with respect to FIG. 2, to cause the processor 202 to block awriter application 708 from accessing the queues until a condition issatisfied. The condition may comprise that each of the queues contains amessage or an end of partition signal. In one embodiment, the gatecontrol logic 706 may be implemented as a GetNextMessage( ) blockingcall that will only return messages if the condition is satisfied. FIG.8 described in additional detail below illustrates an example graph of astate machine for each of the queues, which is used by the gate controllogic 706 to determine if the writer application 708 should be blockedfrom transferring messages in the queues 704 to a memory.

Streaming platform reader 524 includes a writer application 708, alsoreferred to as a main thread, which may be a single threadedapplication, and which may be implemented as a separate component or asone or more logic components, such as on an FPGA which may include amemory or reconfigurable component to store logic and processingcomponent to execute the stored logic, e.g. computer program logic,stored in a memory 204, or other non-transitory computer readablemedium, and executable by a processor 202, such as the processor 202 andmemory 204 described with respect to FIG. 2, to cause the processor 202to, if the messages in the queues 704 are accessible to the writerapplication 708, compare all of the messages in the first positions ofall of the queues of the vector of queues 704, and forward, to a memory,which may be memory 204, the message associated with an earliestsequence identifier.

As discussed above, the sequence identifier associated with each messagemay be based on a clock 508 that augments data with sequence, e.g.,timestamp, information before the messages are transmitted to thestreaming platform. In one embodiment, the sequence data may be someother message attribute, e.g., a numerical identification order. In oneembodiment, the writer application 708 may compare messages and may usea different sorting criteria, e.g., alphabetical order, to determinewhich message is forwarded first to a memory. In one embodiment, thesorting mechanism implemented by the writer application 708 to determinewhich message is prioritized to be stored in a memory may beconfigurable by a user.

As noted above, the gate control logic 706 prevents the writerapplication 708 from writing data from the queues 704 until each of thequeues satisfies a condition based on a queue state machine. Althoughthe messages have already been retrieved from the streaming platform tothe streaming platform reader, the gate control logic prevents thestreaming platform reader from storing the messages to a disk so that aconsuming application, e.g., an auditing system, can then use themessages. Typical streaming platform consumers attempt to read data asquickly as possible. The particular implementation of the disclosedstreaming platform reader differs drastically from typical streamingplatform applications by delaying, in a specific manner, incomingmessages that are stored in the vector of queues. Retrieving messagesfrom the partitions as quickly as possible, e.g., via the multi-threadedreader application, increases streaming speed. The disclosed embodimentsimposes a delay on writing the messages to a disk until the gate controllogic 706 condition has been satisfied.

FIG. 8 illustrates an example graph of a state machine 800 for eachqueue in the vector of queues 704. Messages are held by a queue untilthey are read/removed by the writer thread. The queues are first infirst out (FIFO) queues, and the state machine checks the state of eachqueue to determine whether a message is stored in the first position ofthe queue from where messages are retrieved, i.e., popped off the queue.Each queue may be in one of four states based on the contents of thequeue.

State 1—Not Ready: the queue is empty, but there is no End of Partitionsignal;

State 2—Ready: the queue is not empty;

State 3—End of Partition signal received, but queue is not empty. State3 may occur when the queue for a partition contains a message in thefirst position, but the partition itself does not contain any moremessages, and so there is an end of partition signal after the messagein the first position.

State 4—End of Partition signal received, and queue is empty.

A queue in state 1 transitions to state 2 (802) upon receiving amessage, or from state 1 to state 4 (804) upon receiving an end ofpartition signal.

A queue in state 2 remains in state 2 upon receiving a message (806) orif a message is removed from the queue (i.e., popped off the queue) bythe writer thread (808), as long as a message remains in the queue. Ifthe queue receives an end of partition signal, the state transitions tostate 3 (810). If the last message in the queue is removed by the writerthread without an end of partition signal, the state transitions tostate 1 (812).

A queue in state 3 remain in state 3 as long as there are messages inthe queue ahead of the end of partition signal, even as messages areremoved by the writer thread (814). If the queue receives anothermessage after the end of partition signal, the state transitions tostate 2 (816). If the last message is removed (818) leaving only the endof partition signal, the state transitions to state 4.

The state of a queue in state 4 transitions to state 1 (820) uponreceiving a message.

The gate control logic 706 checks the state of each queue, and if thestate of any of the queues is state 1, the gate control logic blocks thewriter thread/application 708 from reading/popping messages from any ofthe queues and writing messages to memory.

In other words, the streaming platform reader does not write themessages to a disk, for use by a consuming application, until each queuecontains a message, or an end of partition signal. When each queuecontains a message, or an end of partition signal, the writer thread isallowed to choose the earliest message from all of the queues. When theearliest message from one of the queues (i.e., in the first position ofthat queue) is written to the disk 204, the next message in that queuebecomes the message in the first position of that queue. That message inthe first position of that queue is the message that is compared tomessages in the first position from each of the other queues.

FIG. 10 depicts a diagram of one implementation of the streamingplatform reader 524. Generally, the above described embodiment isefficient. However, in particular circumstances of asymmetric messageloads across partitions, e.g. during real time operation where somepartitions receive a higher volume of transactions, at particular times,than other partitions, some of the reader threads may see little to noactivity. However, each reader thread may still cause the executingprocessor to perform a context switch, i.e. the process of storing thestate of a process or of a thread, so that it can be restored andexecution resumed from the same point later, which may unnecessarilyincrease processing loads. Furthermore, in implementations where eachreader thread further post-processes the message content, such postprocessing may slow down that thread. Accordingly, under high asymmetricmessage loads, bottlenecks may be created where a few of the readerthreads are bogged down processing messages while other reader threadssit idle, potentially causing unnecessary context switching.

FIG. 11 shows an alternative embodiment of a streaming platform reader1102. Streaming platform reader 1102 includes a reader application 1104,which, in one embodiment, may be a single threaded application, andwhich may be implemented as a separate component or as one or more logiccomponents, such as on an FPGA which may include a memory orreconfigurable component to store logic and processing component toexecute the stored logic, e.g. computer program logic, stored in amemory 204, or other non-transitory computer readable medium, and whichmay be referred to as reading, reader or poller thread, is executable bya processor 202, such as the processor 202 and memory 204 described withrespect to FIG. 2, to cause the processor 202 to retrieve messages fromeach of the partitions of the streaming platform 514. In thisembodiment, the single reader thread 1104 may retrieve messages from anyof the partitions. As noted above, read messages are not removed fromthe partition but are, instead, denoted as having been read, e.g. theoffset indicative of the next new message to be read is incrementeduntil it reaches the last new message at that time. In an alternativeembodiment, if new messages are added to the partition as old messagesare read out, the new messages will remain in the partition until theyare also read/retrieved by the reader application 1104. In oneembodiment, the reader thread 1104 essentially operates in a continuousor infinite loop reading/attempting to read from any active partition.In particular, the reader thread 1104 is executed on the processor andconfigured to retrieve messages from each partition of a plurality ofpartitions of a streaming platform, wherein each message in theplurality of partitions comprises message content and is associated witha unique identifier, and wherein the streaming platform transmits an endof partition signal to the reader thread signifying an empty partition.

The streaming platform reader 1102 includes a first plurality of queues1112 stored in the memory 204 and coupled with the reader thread 1104,wherein each queue of the first plurality of queues is associated withone of the plurality of partitions and configured to store messages oran end of partition signal from the reader thread, wherein each queue ofthe first plurality of queues 1112 stores messages in a sequence inwhich messages are retrieved by the reader thread, and wherein eachqueue of the first plurality of queues includes a first position thatstores the earliest message stored by a queue. As with the embodimentdescribed above, the plurality of queues 1112 may include a vector ofqueues 704, where each queue is a first-in first-out (FIFO) queue thatstores message retrieved by the reader application/thread 1104. In oneembodiment, each queue is implemented as a ring buffer. Each of thequeues includes a first position where the earliest/first messages arestored and from where messages are read as discussed below. A queue maycontain or be associated with an end of partition signal if theassociated partition is empty. In one embodiment, each queue may be lockfree, i.e. allowing data to be read from the queue while data is beingwritten to the queue.

The producers 502, 504, 506 may be continuously streaming data to thestreaming platform 514, which may then be consumed by consumers, such asthe auditing system 100. The production rate, or the rate at whichmessages are streamed to the streaming platform 514, may vary from theconsumption rate, or the rate at which messages are streamed from thestreaming platform.

The reader thread 1104 may retrieve messages from any of the partitionswhich have messages therein. In real time operation each partition mayhave different levels of activity at different times. Accordingly,different queues may have different numbers of messages, and the queuesmay build up messages at different rates, depending on the rate ofmessages published to the associated partitions, such as may occur inreal time operation. In implementations where the messages containencrypted/encoded content, or content which otherwise requires some formof post processing, such as derivation, translation, conversion ortransformation, the requisite post processing, e.g. decoding ordecrypting, of the message content will be performed as described below.

It should be appreciated that a queue 704 may not contain a message forone of two reasons. A queue may not include a message because thecorresponding partition from which that queue receives messages isempty. Or, a queue may not include a message because the reader threadassociated with that queue is in the process of retrieving a messagefrom the corresponding partition from which that queue receivesmessages.

Streaming platform reader 1102 includes gate control logic 1118, whichis similar to gate control logic 706 described above, which may beimplemented as a separate component or as one or more logic components,such as on an FPGA which may include a memory or reconfigurablecomponent to store logic and processing component to execute the storedlogic, e.g. computer program logic, stored in a memory 204, or othernon-transitory computer readable medium, and executable by a processor202, such as the processor 202 and memory 204 described with respect toFIG. 2, to cause the processor 202 to block a extraction/payloadapplication/thread 1106 from accessing the queues until a condition issatisfied. The condition may comprise that each of the queues contains amessage or an end of partition signal. In one embodiment, the gatecontrol logic 706 may be implemented as a GetNextMessage( ) blockingcall that will only return messages if the condition is satisfied. FIG.8, described in additional detail above, illustrates an example graph ofa state machine for each of the queues, which is used by the gatecontrol logic 706 to determine if the extraction application 1106 shouldbe blocked from transferring messages in the queues 1112 to a secondplurality of queues 1114 as will be described.

Streaming platform reader 1102 includes an extraction/payloadapplication/thread 1106, controlled by the gate control logic 1118 asdescribed above, which may be implemented as a separate component or asone or more logic components, such as on an FPGA which may include amemory or reconfigurable component to store logic and processingcomponent to execute the stored logic, e.g. computer program logic,stored in a memory 204, or other non-transitory computer readablemedium, and executable by a processor 202, such as the processor 202 andmemory 204 described with respect to FIG. 2, to cause the processor 202to compare the identifiers of all of the messages in the first positionsof the queues of the first plurality of queues 1112, extract the messagecontent from the message associated with the earliest identifier fromamong the first positions of the queues of the first plurality ofqueues, and forward the extracted message content to an available queueof a second plurality of queues 1114. In one embodiment, the extractionthread 1106 essentially operates in a continuous or infinite loopreading/attempting to read from any of the first plurality of queues1112. As described, the gate control logic 1118 ensures that theextraction thread 1106 retrieves messages, and extracts thee messagecontent therefrom, in the sequenced order. In one embodiment, themessage and/or message content may be referred to as a Kafka item.

The second plurality of queues 1114 may be stored in the memory 204 andcoupled with the extraction thread 1106, wherein each queue of thesecond plurality of queues is not associated with one of the pluralityof partitions and is configured to store message extracted messagecontent from the extraction thread. The number of queues in the secondplurality of queues 1114 may be two but is implementation dependent andmay include more than two queues depending upon performancerequirements. In one embodiment, as will be described, there is onequeue in the second plurality of queues 1114 associated with each of theprocessing threads of the processing application 1108. As with theembodiment described above, the second plurality of queues 1114 mayinclude a vector of queues 704, where each queue is a first-in first-out(FIFO) queue that stores message retrieved by the extractionapplication/thread 1106. In one embodiment, each queue is implemented asa ring buffer. Each of the queues includes a first position where theearliest/first messages are stored and from where messages are read asdiscussed below. A queue may contain or be associated with an end ofdata signal if empty. In one embodiment, each queue may be lock free,i.e. allowing data to be read from the queue while data is being writtento the queue. The extraction thread 1106 may write message content,extracted from messages, into any of the queues of the second pluralityof queues 1114. In one embodiment, the extraction thread 1106 cyclesthrough the queues of the second plurality of queues 1114 in around-robin fashion, writing to the next available queue and skippingover any queue that may still be full, e.g. awaiting servicing, as willbe described, by it associated processing thread 1108.

Streaming platform reader 1102 includes a processing application 1108,which may be a multithreaded application comprising multiple processingthreads, referred to as a thread pool, which may be implemented as aseparate component or as one or more logic components, such as on anFPGA which may include a memory or reconfigurable component to storelogic and processing component to execute the stored logic, e.g.computer program logic, stored in a memory 204, or other non-transitorycomputer readable medium, and wherein each processing thread 1108 isconcurrently, or otherwise substantially simultaneously, executable by aprocessor 202, such as the processor 202 and memory 204 described withrespect to FIG. 2, to cause the processor 202 to retrieve the messagecontent from one of the queues of the second plurality of queues 1114,process the retrieved message content and store the processed messagecontent in a buffer 1116, referred to as a priority queue, the bufferbeing operative to automatically, upon receipt of message content,arrange the stored processed message content in an ordering inaccordance with the associated identifiers. In one embodiment, theprocessing threads essentially operate in a continuous or infinite loopreading/attempting to read from their associated queue in the secondplurality of queues 1114. In one embodiment, the processed messagecontent may be referred to as Kafka message data.

In one embodiment, the message content is one of encoded or encryptedand each of the plurality processing threads 1108 is operative to one ofdecode or decrypt the encoded or encrypted message content, theprocessed message content comprising the decoded or decrypted messagecontent.

In one embodiment, as each thread of the processing application 1108operates independently and the processing time to process given messagecontent may vary depending on the message content, the processed messagecontent may not be generated in the order in which the unprocessedmessage content is retrieved from the queues 1112 by the extractionapplication 1106. Accordingly, the buffer 1116 is operative to attemptto reorder the processed message content in accordance with thesequencing, i.e. the order in which messages were published to thepartitions. As will be described, as the writer application/thread 1110reads from the buffer 1116 independently to obtain the processed messagecontent associated with the earliest message/identifier, there is apossibility that an even older message may still be in process by one ofthe processing threads 1108. In this case, processed message content maybe output by the streaming platform reader 1102 in a slightly out oforder fashion requiring some post processing of the data prior to usingis, e.g. prior to the auditing process described herein.

Streaming platform reader 1102 includes a writer application/thread1110, also referred to as a main thread, which may be a single threadedapplication, and which may be implemented as a separate component or asone or more logic components, such as on an FPGA which may include amemory or reconfigurable component to store logic and processingcomponent to execute the stored logic, e.g. computer program logic,stored in a memory 204, or other non-transitory computer readablemedium, and executable by a processor 202, such as the processor 202 andmemory 204 described with respect to FIG. 2, to cause the processor 202to extract the processed message content associated with the earliestidentifier from the buffer 1116 and forward the extracted processedmessage content associated with the earliest identifier to a consumingapplication 204, such as a compression application which creates acompressed collection of the processed message content. In oneembodiment, the writer thread 1110 essentially operates in a continuousor infinite loop reading/attempting to read from the buffer 1116.

In one embodiment, to prevent the occurrence of out of order messagecontent appearing in the output, the disclosed streaming platform reader1102 may implement a second buffer (not shown) into which theidentifiers of message content currently awaiting or being processed bythe processing threads 1108 are stored and automatically arranged in anorder such that the earlier message is first to be retrieved. The writerthread 1110 may then be further programmed to retrieve the earliestmessage content from the buffer 1116 only when the identifier thereofmatches the earliest identifier stored in the second buffer. This wouldeffectively block the writer thread 1110 until the processing thread1108 processing the earliest message content completes. It will beappreciated that additional logic may be implemented to detect when aprocessing thread 1108 gets stuck or ceases operation so as to preventthe writer thread 1110 from being blocked indefinitely.

As discussed above, the sequence identifier associated with each messagemay be based on a clock 508 that augments data with sequence, e.g.,timestamp, information before the messages are transmitted to thestreaming platform. In one embodiment, the sequence data may be someother message attribute, e.g., a numerical identification order. In oneembodiment, the writer application 1110 and buffer 1116 may comparemessages and may use a different sorting criteria, e.g., alphabeticalorder, to determine which message is forwarded first to the consumingapplication 204. In one embodiment, the sorting mechanism implemented bythe writer application 111 and buffer 1116 to determine which message isprioritized to be provided to the consuming application 204, orotherwise stored in a memory, may be configurable by a user.

As noted above, the gate control logic 1118 prevents the extractionapplication 1106 from writing data from the queues 1112 until each ofthe queues satisfies a condition based on a queue state machine.Although the messages have already been retrieved from the streamingplatform to the streaming platform reader, the gate control logicprevents the streaming platform reader from storing the messages to adisk so that a consuming application, e.g., an auditing system, can thenuse the messages. Typical streaming platform consumers attempt to readdata as quickly as possible. The particular implementation of thedisclosed streaming platform reader differs drastically from typicalstreaming platform applications by delaying, in a specific manner,incoming messages that are stored in the vector of queues. Retrievingmessages from the partitions as quickly as possible, e.g., via themulti-threaded reader application, increases streaming speed. Thedisclosed embodiments imposes a delay on writing the messages to a diskuntil the gate control logic 706 condition has been satisfied.

FIG. 8 illustrates an example graph of a state machine 800 for eachqueue in the vector of queues 1112. Messages are held by a queue untilthey are read/removed by the writer thread. The queues are first infirst out (FIFO) queues, and the state machine checks the state of eachqueue to determine whether a message is stored in the first position ofthe queue from where messages are retrieved, i.e., popped off the queue.Each queue may be in one of four states based on the contents of thequeue.

State 1—Not Ready: the queue is empty, but there is no End of Partitionsignal;

State 2—Ready: the queue is not empty;

State 3—End of Partition signal received, but queue is not empty. State3 may occur when the queue for a partition contains a message in thefirst position, but the partition itself does not contain any moremessages, and so there is an end of partition signal after the messagein the first position.

State 4—End of Partition signal received, and queue is empty.

A queue in state 1 transitions to state 2 (802) upon receiving amessage, or from state 1 to state 4 (804) upon receiving an end ofpartition signal.

A queue in state 2 remains in state 2 upon receiving a message (806) orif a message is removed from the queue (i.e., popped off the queue) bythe writer thread (808), as long as a message remains in the queue. Ifthe queue receives an end of partition signal, the state transitions tostate 3 (810). If the last message in the queue is removed by the writerthread without an end of partition signal, the state transitions tostate 1 (812).

A queue in state 3 remain in state 3 as long as there are messages inthe queue ahead of the end of partition signal, even as messages areremoved by the writer thread (814). If the queue receives anothermessage after the end of partition signal, the state transitions tostate 2 (816). If the last message is removed (818) leaving only the endof partition signal, the state transitions to state 4.

The state of a queue in state 4 transitions to state 1 (820) uponreceiving a message.

The gate control logic 706 checks the state of each queue, and if thestate of any of the queues is state 1, the gate control logic blocks thewriter thread/application 708 from reading/popping messages from any ofthe queues and writing messages to memory.

In other words, the streaming platform reader does not write themessages to a disk, for use by a consuming application, until each queuecontains a message, or an end of partition signal. When each queuecontains a message, or an end of partition signal, the writer thread isallowed to choose the earliest message from all of the queues. When theearliest message from one of the queues (i.e., in the first position ofthat queue) is written to the disk 204, the next message in that queuebecomes the message in the first position of that queue. That message inthe first position of that queue is the message that is compared tomessages in the first position from each of the other queues.

As compared with the multi-reader threaded embodiment, the single readerthread embodiment may improve performance of recording data, e.g. by asmuch as two times. See the tables below which provides example resultsbased on historical data.

Round Multi-Reader Single Reader Robin Threads (mps) Thread (mps) RunAvg = 50901.9, Avg = 64843.9, Concurrently sd = 7550.4 sd = 8287.7 RunAvg = 86357.9, Avg = 86235.0, Separately sd = 24406.1 sd = 15251.3

Single Multi-Reader Single Reader partition Threads (mps) Thread (mps)Run Avg = 33293.6, Avg = 59875.4, Concurrently sd = 5670.9 sd = 7653.9Run Avg = 34315.2, Avg = 67281.5, Separately sd = 5705.1 sd = 9889.8Avg=Average, sd=standard deviationRound Robin=data is distributed evenly across partitions, simulatingequal amounts of traffic across all market segmentsSingle Partition=all test data was injected into just onetopic/partition in the Kafka broker, simulating a hyper-active futuresmarket segmentRun concurrently=both multi- and single reader applications were runsimultaneously on same Linux boxRun separately=the multi- and single reader applications apps were runsequentially

In one embodiment, wherein the extraction of the message content fromthe message associated with the earliest identifier from the firstplurality if queues and extraction of the processed message contentassociated with the earliest identifier from the buffer increases thespeed with which the auditing system compares the message content fromthe memory to the messages stored in the data warehouse.

In one embodiment, wherein the extraction of the message content fromthe message associated with the earliest identifier from the firstplurality if queues and extraction of the processed message contentassociated with the earliest identifier from the buffer reduces memoryrequirements of comparing the message content from the memory to themessages stored in the data warehouse.

In one embodiment, wherein each message is augmented with a uniqueidentifier before being stored in the streaming platform. In particular,the identifiers may be timestamps, and wherein the messages aregenerated by a plurality of hardware matching processors incommunication with an orderer, the orderer may augment each message upongeneration with a unique identifier.

As described then, in the multi-reader thread embodiment, eachpartition, e.g. market segment or match engine, has its ownreader/poller thread which reads messages from its associated partition,decode/decrypts that data and outputs the decoded/decrypted data to amemory or compression process which stores the data. At busy, highutilization times, some partitions/segments see much more messagetraffic than others, such as the match engines which handle equitiesmarkets. This may result in most threads being idle while the activethreads are backed up/bottle necked with decrypting/decoding the heavytraffic. The large number of threads, idle or otherwise, also may causea significant amount of context switching overhead (a context switch isthe process of storing the state of a process or of a thread, so that itcan be restored and execution resumed from the same point later).

In contrast, the single-reader thread embodiment, a single reader threadis responsible for retrieving the messages from all partitions while thework of decryption/decoding is distributed among a configurable numberof dedicated processing threads, while the per-partition threadscontinue to handle the remaining processing. Heavy decryption/decodingloads then get distributed over the pool of dedicated threads, ratherthan being bottlenecked by a single thread, increasing throughput. Thisresults in less idle threads—any existing threads will be active.

Auditing System

As discussed above, one example of a consumer of streaming platformmessages is an auditing system 528. The auditing system may compare, forauditing purposes, messages from the streaming platform with datamessages produced by producers 502, 504 and 506 that were nottransmitted to the streaming platform, e.g., data messages stored in thedata warehouse 510. Because the data being compared is identical (i.e.,the data originated from the same source, namely, the data producers),the comparison should yield an exact match. If the comparison results indifferent data messages, that may indicate data corruption or a problemin one or more of the data warehouse 510 or the streaming platform 514.In some corporations, a regular audit must be performed to provecompliance with industry standard stored and retrieval techniques.

Data messages may be stored in the data warehouse 510 in the order theywere generated by the match engines, i.e., a generation order,regardless of which match engine generated the messages. For example, ifmatch engine 502 generates messages with sequence identifier 1 and 3,and match engine 504 generates a message with sequence identifier 2, thedata warehouse 510 may store the messages in the sequence the messageswere generated, namely, in sequence 1, 2 and 3, thus interweaving ormultiplexing messages from all of the match engines into a singlesequenced data stream. Accordingly, data messages can be read from thedata warehouse 510 in the generation order. This is typically possibleif the data warehouse 510 is stored locally with the match engines,e.g., the match engines can send messages extremely quickly over a localconnection, such as a data bus 530.

However, data messages that are streamed to a streaming platform 514over a network may be streamed out of the generation order. For example,a message generated earlier than another message may reach the streamingplatform 514 before the earlier-generated message. Moreover, asdescribed above, messages from different match engines/producers may bestreamed to different partitions. Thus, when messages are readfrom/streamed from the streaming platform, the messages are not read inthe generation order (e.g., the data messages from the multiple matchengines multiplexed/interweaved to be in a single data stream in thesequence based on a sequence identifier).

Data comparison of data messages is easier when the data messages beingcompared are in the same sequence/order. Accordingly, by implementingthe disclosed streaming platform reader that orders messages accordingto a sequence identifier, the data comparison performed by an auditingsystem is faster. If the data consumed from the streaming platform wasnot in the generation order, the auditing system has to reorder messagesas they are compared to data messages from the data warehouse 510. Thison-the-fly reordering typically requires a large buffer, large enough tobe able to analyze a group of messages to select the earliest message.The streaming platform reader, by providing messages in the generationorder, accordingly increases the speed of an auditing system. Thestreaming platform reader also decreases the buffering/memoryrequirements of an auditing system.

For example, the data warehouse 510 may output a compressed data file,e.g., a file with a .zip or .rar extension, of the data messages storedin the data warehouse 510 (which again are in the sequence imparted bythe clock (i.e., in the generation order)). The streaming platformreader 524 may similarly output a compressed data file, e.g., a filewith a .zip or .rar extension, of the data messages streamed from thestreaming platform 514. The auditing system 528 may compare the sizes ofthe compressed files to determine if the compressed data messages in thetwo different systems match, or drastically differ. The streamingplatform reader, by reordering messages to be in the same order as themessages in the data warehouse, allows for such a comparison by an auditsystem.

FIG. 9 illustrates an example flowchart of an example computerimplemented method 900 of processing messages from a streaming platform.Embodiments may involve all, more or fewer actions than the illustratedactions. The actions may be performed in the order or sequence shown, orin a different sequence. The actions may be performed simultaneously, orin a parallel or overlapping fashion. The method may be performed byprocessing logic that may comprise hardware (circuitry, dedicated logic,etc.), software, or a combination of both. In one example, the method isperformed by the computer system 100 of FIG. 1, while in some otherexamples, some or all of the method may be performed by another machine.

In an embodiment, method 900 may be implemented by streaming platformreader 524. At step 902, method 900 includes receiving for eachpartition of the plurality of partitions, one of: (i) messages stored inthe partition in the sequence in which the messages were received by thepartition, wherein each message in the plurality of partitions isassociated with a unique identifier, or (ii) an end of partition signalfor a partition that does not contain a message.

At step 904, method 900 includes, upon determining that a message or anend of partition signal has been received for each partition of theplurality of partitions, comparing, by the processor, the uniqueidentifiers of each of the received first-received messages.

At step 906, method 900 includes forwarding to a consuming applicationthe first-received message having the earliest identifier.

FIG. 12 illustrates an example flowchart of an example computerimplemented method 1200 of processing messages from a streamingplatform. Embodiments may involve all, more or fewer actions than theillustrated actions. The actions may be performed in the order orsequence shown, or in a different sequence. The actions may be performedsimultaneously, or in a parallel or overlapping fashion. The method maybe performed by processing logic that may comprise hardware (circuitry,dedicated logic, etc.), software, or a combination of both. In oneexample, the method is performed by the computer system 100 of FIG. 1,while in some other examples, some or all of the method may be performedby another machine.

In an embodiment, method 1200 may be implemented by streaming platformreader 1102 described above with respect to FIG. 11. The operation mayinclude retrieving, by a reader thread executing on a processor,messages from each partition of a plurality of partitions of a streamingplatform, wherein each message in the plurality of partitions comprisesmessage content and is associated with a unique identifier, and whereinthe streaming platform transmits an end of partition signal to thereader thread signifying an empty partition (Block 1202); storing, bythe reader thread, the retrieved messages in a first plurality of queuesstored in a memory coupled with the reader thread, wherein each queue ofthe first plurality of queues is associated with one of the plurality ofpartitions and configured to store messages or an end of partitionsignal from the reader thread, wherein each queue of the first pluralityof queues stores messages in a sequence in which messages are retrievedby the reader thread, and wherein each queue of the first plurality ofqueues includes a first position that stores the earliest message storedby a queue (Block 1204); extracting, by an extraction thread executingon the processor and controlled by gate control logic (Block 1206), theextracting including: comparing the identifiers of all of the messagesin the first positions of the queues of the first plurality of queues(Block 1208); extracting the message content from the message associatedwith the earliest identifier from among the first positions of thequeues of the first plurality of queues (Block 1210); forwarding theextracted message content to an available queue of a second plurality ofqueues (Block 1212); and blocking, by the gate control logic, theextraction thread unless each of the queues of the first plurality ofqueues contains message content or an end of partition signal (Block1214); retrieving the message content by one of a plurality ofprocessing threads executing on the processor, each configured toretrieve the message content from one of the queues of the secondplurality of queues (Block 1216), processing the retrieved messagecontent (Block 1218) and storing the processed message content in abuffer (Block 1220), the buffer being operative to automatically arrangethe stored processed message content in an ordering in accordance withthe associated identifiers; and extracting, by a writer thread executingon the processor and configured to extract the processed message contentassociated with the earliest identifier from the buffer (Block 1222) andforwarding the extracted processed message content associated with theearliest identifier to a consuming application (Block 1224).

In one embodiment, the identifiers define a sequence, and wherein themessages are forwarded to the consuming application in the sequencedefined by the identifiers, e.g. timestamps.

In one embodiment, wherein the message content is one of encoded orencrypted, the processing further comprising one of decoding ordecrypting the encoded or encrypted message content, the processedmessage content comprising the decoded or decrypted message content.

In one embodiment, each queue of the first and second plurality ofqueues is a first in first out (FIFO) queue, so that messages receivedby a queue in a sequence are removed from the queue in the samesequence.

In one embodiment, each partition is a first in first (FIFO) partition,so that messages streamed to a partition in a sequence are retrievedfrom the partition in the same sequence.

In one embodiment, the gate control logic implements a state machine foreach queue of the first plurality of queues and determines if the queueis in one of: (i) a first state defined by the queue not having anymessages or an end of partition signal; (ii) a second state defined bythe queue having at least one message and not having an end of partitionsignal; (iii) a third state defined by the queue having at least onemessage and an end of partition signal; or (iv) a fourth state definedby the queue not having any messages and having an end of partitionsignal; and wherein the blocking further comprises blocking theextraction thread from accessing any of the first plurality of queues ifany queue of the first plurality queues is in the first state.

In one embodiment, the gate control logic determines the state of eachqueue of the first plurality of queues after a message content isforwarded to the second plurality of queues.

In one embodiment, the messages are electronic data transaction resultmessages generated by hardware matching processors in an exchangecomputing system.

In one embodiment, the operation of the streaming platform reader 1102further comprising augmenting each message with a unique identifierbefore being stored in the streaming platform.

The illustrations of the embodiments described herein are intended toprovide a general understanding of the structure of the variousembodiments. The illustrations are not intended to serve as a completedescription of all of the elements and features of apparatus and systemsthat utilize the structures or methods described herein. Many otherembodiments may be apparent to those of skill in the art upon reviewingthe disclosure. Other embodiments may be utilized and derived from thedisclosure, such that structural and logical substitutions and changesmay be made without departing from the scope of the disclosure.Additionally, the illustrations are merely representational and may notbe drawn to scale. Certain proportions within the illustrations may beexaggerated, while other proportions may be minimized. Accordingly, thedisclosure and the figures are to be regarded as illustrative ratherthan restrictive.

While this specification contains many specifics, these should not beconstrued as limitations on the scope of the invention or of what may beclaimed, but rather as descriptions of features specific to particularembodiments of the invention. Certain features that are described inthis specification in the context of separate embodiments can also beimplemented in combination in a single embodiment. Conversely, variousfeatures that are described in the context of a single embodiment canalso be implemented in multiple embodiments separately or in anysuitable sub-combination. Moreover, although features may be describedas acting in certain combinations and even initially claimed as such,one or more features from a claimed combination can in some cases beexcised from the combination, and the claimed combination may bedirected to a sub-combination or variation of a sub-combination.

Similarly, while operations are depicted in the drawings and describedherein in a particular order, this should not be understood as requiringthat such operations be performed in the particular order shown or insequential order, or that all illustrated operations be performed, toachieve desirable results. In certain circumstances, multitasking andparallel processing may be advantageous. Moreover, the separation ofvarious system components in the described embodiments should not beunderstood as requiring such separation in all embodiments, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

One or more embodiments of the disclosure may be referred to herein,individually and/or collectively, by the term “invention” merely forconvenience and without intending to voluntarily limit the scope of thisapplication to any particular invention or inventive concept. Moreover,although specific embodiments have been illustrated and describedherein, it should be appreciated that any subsequent arrangementdesigned to achieve the same or similar purpose may be substituted forthe specific embodiments shown. This disclosure is intended to cover anyand all subsequent adaptations or variations of various embodiments.Combinations of the above embodiments, and other embodiments notspecifically described herein, will be apparent to those of skill in theart upon reviewing the description.

The Abstract of the Disclosure is provided to comply with 37 C.F.R. §1.72(b) and is submitted with the understanding that it will not be usedto interpret or limit the scope or meaning of the claims. In addition,in the foregoing Detailed Description, various features may be groupedtogether or described in a single embodiment for the purpose ofstreamlining the disclosure. This disclosure is not to be interpreted asreflecting an intention that the claimed embodiments require morefeatures than are expressly recited in each claim. Rather, as thefollowing claims reflect, inventive subject matter may be directed toless than all of the features of any of the disclosed embodiments. Thus,the following claims are incorporated into the Detailed Description,with each claim standing on its own as defining separately claimedsubject matter.

It is therefore intended that the foregoing detailed description beregarded as illustrative rather than limiting, and that it be understoodthat it is the following claims, including all equivalents, that areintended to define the spirit and scope of this invention.

1. A system for reading messages from a streaming platform comprising aplurality of partitions wherein each message in the plurality ofpartitions comprises message content and is associated with a uniqueidentifier, and wherein the streaming platform transmits an end ofpartition signal to signify an empty partition, the system comprising:at least one first processing thread executed on a processor andconfigured to continuously retrieve messages or the end of partitionsignal from each partition of a plurality of partitions of the streamingplatform and store the retrieved messages or end of partition signal inat least two queues stored in a memory and coupled with the processor,wherein each of the at least two queues is associated with one of theplurality of partitions, wherein each of the at least two queues storesmessages in a sequence in which messages are retrieved by the firstprocessing thread, the earliest of which being stored in a firstposition of the respective queue; a second processing thread executed onthe processor independently of the at least one first processing threadand configured, only when each of the at least two queues contains atleast one message or an end of partition signal, to continuously:compare the identifiers of all of the messages in the first positions ofthe at least two queues; extract the message content from the messageassociated with the earliest identifier of the messages stored in thefirst positions of the at least two queues; and forward the extractedmessage content to a receiver; wherein the extracted message content isforwarded to the receiver in an order in accordance with a sequencedefined by the unique identifiers associated therewith.
 2. The system ofclaim 1, wherein the second processing thread is coupled with logicwhich prevents the second processing thread from extracting messagecontent unless each of the at least two queues contains at least onemessage or an end of partition signal.
 3. The system of claim 2, whereinthe logic implements a state machine for each queue of the firstplurality of queues and determines if the queue is in one of: (i) afirst state defined by the queue not having any messages or an end ofpartition signal; (ii) a second state defined by the queue having atleast one message and not having an end of partition signal; (iii) athird state defined by the queue having at least one message and an endof partition signal; or (iv) a fourth state defined by the queue nothaving any messages and having an end of partition signal; and whereinthe logic blocks the second processing thread from accessing any of thefirst plurality of queues if any queue of the first plurality queues isin the first state.
 4. The system of claim 2, wherein the logicdetermines the state of each queue of the first plurality of queuesafter a message content is forwarded to the second plurality of queues.5. The system of claim 1, wherein the receiver comprises a data storagedevice.
 6. The system of claim 1, wherein the receiver comprises atleast one receiving queue, the system further comprising: a plurality ofthird processing threads executed on the processor independently of theat least one first processing thread and the second processing thread,each configured to retrieve the message content from the receivingqueue, process and store the processed retrieved message content in anordering in accordance with the associated identifiers; and a fourthprocessing thread executed on the processor independently of the first,second and third processing threads and configured to forward the storedprocessed message content in an ordering in accordance with theassociated identifiers to a consuming application.
 7. The system ofclaim 4, wherein the message content is one of encoded or encrypted,each of the plurality of third processing threads being operative to oneof decode or decrypt the encoded or encrypted message content, theprocessed message content comprising the decoded or decrypted messagecontent.
 8. The system of claim 1, wherein each queue of the firstplurality of queues is a first in first out (FIFO) queue, so thatmessages received by a queue in a sequence are removed from the queue inthe same sequence.
 9. The system of claim 1, wherein each partition is afirst in first (FIFO) partition, so that messages streamed to apartition in a sequence are retrieved from the partition in the samesequence.
 10. The system of claim 1, wherein the messages are electronicdata transaction result messages generated by hardware matchingprocessors in an exchange computing system.
 11. The system of claim 10,wherein the receiver is configured to store the processed messagecontent in a memory and further wherein the messages are also forwardedto a data warehouse, the system further comprising an auditing systemconfigured to compare the message content from the memory to themessages stored in the data warehouse.
 12. The system of claim 11,wherein the extraction of the message content from the messageassociated with the earliest identifier from the first plurality ifqueues and extraction of the processed message content associated withthe earliest identifier from the buffer increases the speed with whichthe auditing system compares the message content from the memory to themessages stored in the data warehouse.
 13. The system of claim 11,wherein the extraction of the message content from the messageassociated with the earliest identifier from the first plurality ifqueues and extraction of the processed message content associated withthe earliest identifier from the buffer reduces memory requirements ofcomparing the message content from the memory to the messages stored inthe data warehouse.
 14. The system of claim 1, wherein each message isaugmented with a unique identifier before being stored in the streamingplatform.
 15. A computer implemented method for reading messages from astreaming platform comprising a plurality of partitions wherein eachmessage in the plurality of partitions comprises message content and isassociated with a unique identifier, and wherein the streaming platformtransmits an end of partition signal to signify an empty partition, themethod comprising: retrieving, continuously by at least one firstprocessing thread executed on a processor, messages or the end ofpartition signal from each partition of a plurality of partitions of thestreaming platform and storing the retrieved messages or end ofpartition signal in at least two queues stored in a memory and coupledwith the processor, wherein each of the at least two queues isassociated with one of the plurality of partitions, wherein each of theat least two queues stores messages in a sequence in which messages areretrieved by the first processing thread, the earliest of which beingstored in a first position of the respective queue; continuously, by asecond processing thread executed on the processor independently of theat least one first processing thread and configured, only when each ofthe at least two queues contains at least one message or an end ofpartition signal: comparing the identifiers of all of the messages inthe first positions of the at least two queues; extracting the messagecontent from the message associated with the earliest identifier of themessages stored in the first positions of the at least two queues; andforwarding the extracted message content to a receiver; wherein theextracted message content is forwarded to the receiver in an order inaccordance with a sequence defined by the unique identifiers associatedtherewith.
 16. The computer implemented method of claim 15, furthercomprising preventing, by logic coupled with the second processingthread, the second processing thread from extracting message contentunless each of the at least two queues contains at least one message oran end of partition signal.
 17. The computer implemented method of claim16, wherein the logic implements a state machine for each queue of thefirst plurality of queues and determines if the queue is in one of: (i)a first state defined by the queue not having any messages or an end ofpartition signal; (ii) a second state defined by the queue having atleast one message and not having an end of partition signal; (iii) athird state defined by the queue having at least one message and an endof partition signal; or (iv) a fourth state defined by the queue nothaving any messages and having an end of partition signal, and whereinthe method further comprises blocking, by the logic, the secondprocessing thread from accessing any of the first plurality of queues ifany queue of the first plurality queues is in the first state.
 18. Thecomputer implemented method of claim 16, further comprising determining,by the logic, the state of each queue of the first plurality of queuesafter a message content is forwarded to the second plurality of queues.19. The computer implemented method of claim 15, wherein the receivercomprises a data storage device.
 20. The computer implemented method ofclaim 15, wherein the receiver comprises at least one receiving queue,the method further comprising: retrieving, by a plurality of thirdprocessing threads executed on the processor independently of the atleast one first processing thread and the second processing thread, themessage content from the receiving queue, process and storing theprocessed retrieved message content in an ordering in accordance withthe associated identifiers; and forwarding, by a fourth processingthread executed on the processor independently of the first, second andthird processing threads, the stored processed message content in anordering in accordance with the associated identifiers to a consumingapplication.
 21. The computer implemented method of claim 20, whereinthe message content is one of encoded or encrypted, the method furthercomprising decoding or decrypting, by each of the plurality of thirdprocessing threads, the encoded or encrypted message content, theprocessed message content comprising the decoded or decrypted messagecontent.
 22. The computer implemented method of claim 15, wherein eachqueue of the first plurality of queues is a first in first out (FIFO)queue, so that messages received by a queue in a sequence are removedfrom the queue in the same sequence.
 23. The computer implemented methodof claim 15, wherein each partition is a first in first (FIFO)partition, so that messages streamed to a partition in a sequence areretrieved from the partition in the same sequence.
 24. The computerimplemented method of claim 15, wherein the messages are electronic datatransaction result messages generated by hardware matching processors inan exchange computing system.
 25. The computer implemented method ofclaim 24, wherein the receiver is configured to store the processedmessage content in a memory and further wherein the messages are alsoforwarded to a data warehouse, the system further comprising an auditingsystem configured to compare the message content from the memory to themessages stored in the data warehouse.
 26. The computer implementedmethod of claim 25, wherein the extraction of the message content fromthe message associated with the earliest identifier from the firstplurality if queues and extraction of the processed message contentassociated with the earliest identifier from the buffer increases thespeed with which the auditing system compares the message content fromthe memory to the messages stored in the data warehouse.
 27. Thecomputer implemented method of claim 25, wherein the extraction of themessage content from the message associated with the earliest identifierfrom the first plurality if queues and extraction of the processedmessage content associated with the earliest identifier from the bufferreduces memory requirements of comparing the message content from thememory to the messages stored in the data warehouse.
 28. The computerimplemented method of claim 15, wherein each message is augmented with aunique identifier before being stored in the streaming platform.
 29. Anon-transitory computer readable medium for reading messages from astreaming platform comprising a plurality of partitions wherein eachmessage in the plurality of partitions comprises message content and isassociated with a unique identifier, and wherein the streaming platformtransmits an end of partition signal to signify an empty partition, thenon-transitory computer readable medium storing instructions which whenexecuted by a processor cause the processor to: retrieve, continuouslyby at least one first processing thread, messages or the end ofpartition signal from each partition of a plurality of partitions of thestreaming platform and store the retrieved messages or end of partitionsignal in at least two queues stored in a memory and coupled with theprocessor, wherein each of the at least two queues is associated withone of the plurality of partitions, wherein each of the at least twoqueues stores messages in a sequence in which messages are retrieved bythe first processing thread, the earliest of which being stored in afirst position of the respective queue; continuously, by a secondprocessing thread executed independently of the at least one firstprocessing thread, only when each of the at least two queues contains atleast one message or an end of partition signal: compare the identifiersof all of the messages in the first positions of the at least twoqueues; extract the message content from the message associated with theearliest identifier of the messages stored in the first positions of theat least two queues; and forward the extracted message content to areceiver; wherein the extracted message content is forwarded to thereceiver in an order in accordance with a sequence defined by the uniqueidentifiers associated therewith.
 30. A computer system for readingmessages from a streaming platform comprising a plurality of partitionswherein each message in the plurality of partitions comprises messagecontent and is associated with a unique identifier, and wherein thestreaming platform transmits an end of partition signal to signify anempty partition, the system comprising: means for retrieving,continuously, messages or the end of partition signal from eachpartition of a plurality of partitions of the streaming platform andstoring the retrieved messages or end of partition signal in at leasttwo queues stored in a memory and coupled with the processor, whereineach of the at least two queues is associated with one of the pluralityof partitions, wherein each of the at least two queues stores messagesin a sequence in which messages are retrieved by the first processingthread, the earliest of which being stored in a first position of therespective queue; means for continuously, independently of the means forretrieving, only when each of the at least two queues contains at leastone message or an end of partition signal: comparing the identifiers ofall of the messages in the first positions of the at least two queues;extracting the message content from the message associated with theearliest identifier of the messages stored in the first positions of theat least two queues; and forwarding the extracted message content to areceiver; wherein the extracted message content is forwarded to thereceiver in an order in accordance with a sequence defined by the uniqueidentifiers associated therewith.